![]() |
VOOZH | about |
dotnet/nightly/yarp
Official images for YARP (Yet Another Reverse Proxy)
Important: The images from the dotnet/nightly repositories include last-known-good (LKG) builds for the next release of .NET.
2.3-preview
docker pull mcr.microsoft.com/dotnet/nightly/yarp:2.3-previewThis image contains an implementation of YARP, a reverse proxy framework in .NET.
Watch discussions for Docker-related .NET announcements.
The .NET Docker samples show various ways to use .NET and Docker together. See Introduction to .NET and Docker to learn more.
You can run this image to launch a YARP instance.
YARP expects the config file to be in /etc/yarp.config, and listens by default on port 5000.
Example of configuration:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ReverseProxy": {
"Routes": {
"route1": {
"ClusterId": "cluster1",
"Match": {
"Path": "/aspnetapp/{**catch-all}"
},
"Transforms": [
{ "PathRemovePrefix": "/aspnetapp" }
]
}
},
"Clusters": {
"cluster1": {
"Destinations": {
"destination1": {
"Address": "http://aspnetapp1:8080"
}
}
}
}
}
}
It can then be used with the following command (where my-config.config is a file containing this configuration):
docker run --rm --name myaspnetapp -d -t mcr.microsoft.com/dotnet/samples:aspnetapp
docker run --rm -v $(pwd)/my-config.config:/etc/yarp.config -p 5000:5000 --link myaspnetapp:aspnetapp1 mcr.microsoft.com/dotnet/yarp:latest
This example will proxy every requests from http://localhost:5000/aspnetapp to the mcr.microsoft.com/dotnet/samples:aspnetapp container deployed.
The YARP GitHub repository contains more configuration samples.
For more details, see the documentation for how to configure the image and documentation for the reverse proxy configuration.
This image supports OpenTelemetry. It can be configured by passing environment variables to the container:
docker run --rm -v $(pwd)/my-config.config:/etc/yarp.config -p 5000:5000 -e OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-endpoint.internal:4317 mcr.microsoft.com/dotnet/yarp:latest
See the OTLP Exporter Configuration for all supported environment variables.
You can skip HTTPS validation for the OTLP endpoint only by passing the environment variable YARP_UNSAFE_OLTP_CERT_ACCEPT_ANY_SERVER_CERTIFICATE.
.NET:
.NET Framework:
View the current tags at the Microsoft Artifact Registry portal or on GitHub.
.NET container images are regularly monitored for the presence of CVEs. A given image will be rebuilt to pick up fixes for a CVE when:
Please refer to the Security Policy and Container Vulnerability Workflow for more detail about what to do when a CVE is encountered in a .NET image.
No tags have been pushed to this repository yet.