{"id":5987,"date":"2022-01-24T15:22:32","date_gmt":"2022-01-24T15:22:32","guid":{"rendered":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/"},"modified":"2022-01-24T15:22:32","modified_gmt":"2022-01-24T15:22:32","slug":"how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/","title":{"rendered":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT"},"content":{"rendered":"<p> <a href=\"https:\/\/go.fiverr.com\/visit\/?bta=1052423&nci=17043\" Target=\"_Top\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/fiverr.ck-cdn.com\/tn\/serve\/?cid=40081059\"  width=\"601\" height=\"201\"><\/a>\n<\/p>\n<div id=\"article-content-area\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-15224\" data-pagespeed-lazy-data-srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2022\/01\/0ff1b417.jpg?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2022\/01\/0ff1b417.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" data-sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2022\/01\/0ff1b417.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Traefik logo\" width=\"1202\" height=\"677\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p><a href=\"https:\/\/traefik.io\/traefik\">Traefik is<\/a> a leading reverse proxy and load balancer for cloud-native operations and containerized workloads. It functions as an edge router that publishes your services to the internet.<\/p>\n<p>Traefik routes requests to your containers by matching request attributes such as the domain, URL, and port. The proxy incorporates automatic service discovery so you can add new containers in real-time, without restarting the Traefik service.<\/p>\n<p>In this guide, we\u2019ll put together a simple Traefik v2 deployment that will publish multiple Docker containers. This lets you use one Docker installation to provide several services over the same port, such as a web application, API, and administration panel.<\/p>\n<h2 id=\"getting-started\">Getting Started<\/h2>\n<p>It\u2019s easiest to deploy Traefik using its <a href=\"https:\/\/hub.docker.com\/_\/traefik\">own Docker image<\/a>. We\u2019ll assume you\u2019re running Traefik with Docker for the remainder of this guide. Single-file <a href=\"https:\/\/github.com\/traefik\/traefik\/releases\">binaries are available<\/a> as an alternative option if you\u2019d prefer Traefik to sit outside your Docker installation.<\/p>\n<p>You must create a config file before you can start using Traefik. Add the following content to a <code>traefik.toml<\/code> file \u2013 we\u2019ll explain what it does below:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[entryPoints]&#13;\n  [entryPoints.http]&#13;\n      address = \":80\"&#13;\n      [entryPoints.http.http.redirections.entryPoint]&#13;\n          to = \"https\"&#13;\n          scheme = \"https\"&#13;\n  [entryPoints.https]&#13;\n      address = \":443\"&#13;\n\u00a0\n[providers]&#13;\n  [providers.docker]&#13;\n    network = \"traefik\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This config file configures Traefik with two \u201centrypoints.\u201d Entrypoints describe how requests reach the Traefik service. HTTP and HTTPS entrypoints are created to listen on ports 80 and 443 respectively. In the case of an HTTP request, a redirection rule is used to forward it to the <code>https<\/code> entrypoint instead. Remove the redirection section if you want to be able to serve content over plain HTTP.<\/p>\n<p>The \u201cproviders\u201d section configures the sources that define your network routes. Providers are simply infrastructure components which can issue Traefik with routing instructions. If you wanted to, you could write a <a href=\"https:\/\/doc.traefik.io\/traefik\/providers\/http\">custom HTTP API endpoint<\/a> to define your routes.<\/p>\n<p>In this example, we\u2019re keeping it simple and using the <code>docker<\/code> provider. This monitors the Docker containers running on your host. When a new container appears with Traefik-specific labels, those values will be used to set up a route to the container. The containers will need to be attached to the <code>traefik<\/code> Docker network for this to work as that\u2019s the network specified in the config file. Create the network now:<\/p>\n<pre>docker network create traefik<\/pre>\n<h2 id=\"starting-traefik\">Starting Traefik<\/h2>\n<p>Now you\u2019re ready to start Traefik! Deploy a new container with the Traefik image. Bind ports 80 and 443 to your host, allowing Traefik to listen for incoming requests. You should also join the container to the <code>traefik<\/code> network created earlier.<\/p>\n<p>\u00a0<\/p>\n<p>Mount your host\u2019s Docker socket into the Traefik container with the <code>-v<\/code> flag. This gives Traefik the ability to access other containers running on your host, enabling automatic detection of routes via the <code>docker<\/code> provider set up in your config file. The config file itself is mounted to <code>\/traefik.toml<\/code> inside the Traefik container.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15226\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2022\/01\/817996c0.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"995\" height=\"266\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<pre>docker run -d \\&#13;\n  -p 80:80 \\&#13;\n  -p 443:443 \\&#13;\n  -v $PWD\/traefik.toml:\/traefik.toml \\&#13;\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\&#13;\n  --name traefik \\&#13;\n  --network traefik \\&#13;\n  traefik:2.6<\/pre>\n<p>Next start a couple of containers to test that Traefik is working:<\/p>\n<pre>docker run -d \\&#13;\n  --label traefik.http.routers.apache.rule=Host\\(\\`apache.example.com\\`\\) \\&#13;\n  --name apache \\&#13;\n  --network traefik \\&#13;\n  httpd:latest&#13;\n&#13;\ndocker run -d \\&#13;\n  --label traefik.http.routers.nginx.rule=Host\\(\\`nginx.example.com\\`\\) \\&#13;\n  --name nginx \\&#13;\n  --network traefik \\&#13;\n  nginx:latest<\/pre>\n<p>Make sure you\u2019ve added DNS records for <code>apache.example.com<\/code> and <code>nginx.example.com<\/code> that map to your Traefik host. You should be able to visit those domains in your browser to see the default Apache and NGINX landing pages respectively. The two containers are joined to the Traefik network; their <code>traefik.http.routers<\/code> labels set up basic routes that match incoming requests by the value of their <code>Host<\/code> header.<\/p>\n<h2 id=\"routing-traffic\">Routing Traffic<\/h2>\n<p>Traefik supports several different <a href=\"https:\/\/doc.traefik.io\/traefik\/routing\/routers\">\u201cmatchers\u201d for routing<\/a> your traffic. We\u2019ve used the Host matcher above but you can also route by HTTP method, headers, URI, IP address, and query string parameters. Add multiple matchers to your containers to build up more complex routing rules.<\/p>\n<p>Traefik also supports <a href=\"https:\/\/doc.traefik.io\/traefik\/middlewares\/http\/overview\">middlewares<\/a> that let you modify the request before it reaches your services. You might want to <a href=\"https:\/\/doc.traefik.io\/traefik\/middlewares\/http\/addprefix\">add a prefix<\/a>, <a href=\"https:\/\/doc.traefik.io\/traefik\/middlewares\/http\/headers\">adjust headers<\/a>, or apply <a href=\"https:\/\/doc.traefik.io\/traefik\/middlewares\/http\/basicauth\">Basic Authentication<\/a> at the proxy level. Here\u2019s an example of using the <code>Headers<\/code> middleware to add an extra <code>X-Proxied-By<\/code> request header:<\/p>\n<pre>docker run -d \\&#13;\n  --label traefik.http.routers.nginx.rule=Host\\(\\`nginx.example.com\\`\\) \\&#13;\n  --label traefik.http.middlewares.demo.headers.customrequestheaders.X-Proxied-By=traefik&#13;\n  --name nginx \\&#13;\n  --network traefik \\&#13;\n  nginx:latest<\/pre>\n<p>Traefik routes traffic to <a href=\"https:\/\/www.cloudsavvyit.com\/14880\/whats-the-difference-between-exposing-and-publishing-a-docker-port\">the exposed ports of<\/a> your containers. You can specify a different port by setting the <code>traefik.http.services.&lt;demo-service&gt;.loadbalancer.server.port=8080<\/code> label.<\/p>\n<h2 id=\"adding-ssl\">Adding SSL<\/h2>\n<p>Next you should add SSL to ensure your traffic is fully protected. Traefik includes <a href=\"https:\/\/letsencrypt.org\">Let\u2019s Encrypt<\/a> integration so we\u2019ll that use now to automate certificate generation.<\/p>\n<p>Add the following section to your <code>traefik.toml<\/code> file:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[certificatesResolvers.lets-encrypt.acme]&#13;\n  email = \"you@example.com\"&#13;\n  storage = \"\/acme.json\"&#13;\n  [certificatesResolvers.lets-encrypt.acme.tlsChallenge]<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This configures Traefik to use the Let\u2019s Encrypt ACME provider when resolving certificate requests. Make sure to replace the email address with your own so you receive any certificate expiry reminders sent by Let\u2019s Encrypt. The <code>tlsChallenge<\/code> section defines how certification verification occurs; leaving it empty will use the default flow of serving a unique file which Let\u2019s Encrypt will request and validate during certificate issuance.<\/p>\n<p>Restart or replace your Traefik container to apply the new configuration. You should also mount a new file to <code>\/acme.json<\/code> inside the container \u2013 Traefik will use this to store certificates.<\/p>\n<pre>docker run -d \\&#13;\n  -p 80:80 \\&#13;\n  -p 443:443 \\&#13;\n  -v $PWD\/acme.json:\/acme.json \\&#13;\n  -v $PWD\/traefik.toml:\/traefik.toml \\&#13;\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\&#13;\n  --name traefik \\&#13;\n  --network traefik \\&#13;\n  traefik:2.6<\/pre>\n<h2 id=\"using-the-dashboard\">Using the Dashboard<\/h2>\n<p>Traefik includes a web UI that offers a graphical view of the endpoints, providers, and services (containers) active in your deployment. You can expose the UI by setting up a route for it in your config file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15225\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2022\/01\/b53b0978.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"648\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>First modify your existing <code>traefik.toml<\/code> with the following section:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[api]&#13;\n  dashboard = true&#13;\n\u00a0\n[providers.file]&#13;\n  filename = \"\/traefik_dashboard.toml\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Next create <code>traefik_dashboard.toml<\/code> with the following content:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[http.middleware.dashboard_auth.basicAuth]&#13;\n  users = [&#13;\n    \"admin:$123...\"&#13;\n  ]&#13;\n\u00a0\n[http.routers.api]&#13;\n  rule = \"Host(`traefik.example.com`)\"&#13;\n  entrypoints = [\"https\"]&#13;\n  middlewares = [\"dashboard_auth\"]&#13;\n  service = \"api@internal\"&#13;\n  [http.routers.api.tls]&#13;\n    certResolver = \"lets-encrypt\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The new file is needed as Traefik as doesn\u2019t support \u201cdynamic\u201d configuration (services and routers) alongside the \u201cstatic\u201d values in your main <code>traefik.toml<\/code>. The dashboard config file manually defines a route that maps <code>traefik.example.com<\/code> to the internal web UI service. The <code>providers.file<\/code> line added to <code>traefik.toml<\/code> registers the new route definition with the <code>file<\/code> provider.<\/p>\n<p>Use <code>htpasswd<\/code> to generate a set of HTTP Basic Auth credentials. Add the generated string to the <code>users<\/code> array in the <code>dashboard_auth<\/code> middleware. You\u2019ll need to use this username and password to access the dashboard.<\/p>\n<pre>sudo apt install apache2-utils&#13;\nhtpasswd -nb admin your_password&#13;\n&#13;\n# Outputs admin:$123...<\/pre>\n<p>Now restart Traefik with your updated configuration, remembering to mount the new <code>traefik_dashboard.toml<\/code> file too:<\/p>\n<pre>docker run -d \\&#13;\n  -p 80:80 \\&#13;\n  -p 443:443 \\&#13;\n  -v $PWD\/acme.json:\/acme.json \\&#13;\n  -v $PWD\/traefik.toml:\/traefik.toml \\&#13;\n  -v $PWD\/traefik_dashboard.toml:\/traefik_dashboard.toml \\&#13;\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\&#13;\n  --name traefik \\&#13;\n  --network traefik \\&#13;\n  traefik:2.6<\/pre>\n<p>You should be able to access the dashboard by heading to <code>traefik.example.com<\/code> in your browser. If you don\u2019t want to expose the web UI as a route and will always access it from your local machine, you can publish port <code>8080<\/code> on your Traefik container instead. Modify your <code>traefik.toml<\/code> file with the following section:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[api]&#13;\n  dashboard = true&#13;\n  insecure = true<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre>docker run -d \\&#13;\n  -p 8080:8080 \\&#13;\n  -p 80:80 \\&#13;\n  -p 443:443 \\&#13;\n  -v $PWD\/acme.json:\/acme.json \\&#13;\n  -v $PWD\/traefik.toml:\/traefik.toml \\&#13;\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\&#13;\n  --name traefik \\&#13;\n  --network traefik \\&#13;\n  traefik:2.6<\/pre>\n<p>This will let you access the dashboard via <code>http:\/\/localhost:8080<\/code>. This approach should not be used in secure production environments but makes for quicker set up of local experiments.<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Traefik is a versatile reverse proxy solution for your containers. In this article, we\u2019ve only covered the most fundamental of its capabilities. Beyond basic use with Docker, Traefik <a href=\"https:\/\/doc.traefik.io\/traefik\/providers\/overview\">also works with<\/a> leading container orchestration solutions including <a href=\"https:\/\/www.cloudsavvyit.com\/14221\/kubernetes-vs-docker-swarm-which-should-you-use\">Kubernetes, Docker Swarm<\/a>, and Mesos.<\/p>\n<p>Traefik provides a REST API as well as metrics in formats understood by <a href=\"https:\/\/www.cloudsavvyit.com\/15124\/what-is-prometheus-and-why-is-it-so-popular\">Prometheus<\/a>, InfluxDB, Datadog, and Statsd. These capabilities let you automate and instrument Traefik deployments alongside the other infrastructure components in your stack. It\u2019s an ideal way to publish containerized workloads to the world without using a <a href=\"https:\/\/www.cloudsavvyit.com\/13024\/how-to-run-your-own-kubernetes-cluster-with-microk8s\/\">full orchestration<\/a> solution.<\/p>\n<\/div>\n<iframe data-lazy=\"true\" data-src=\"https:\/\/www.fiverr.com\/gig_widgets?id=U2FsdGVkX18x7XQvttUTrv1oEqmGNGTgvvCUiUoJ\/AP4z\/UyMz8lXGOLpu15jIMxBbTR0gmD5uBoFvhC4KWeALQRp3h\/X\/AwcVD0K8Wj9H\/ZzYKzcCNHosB9oS4SCJJFWiN85P9ICAc4OgCoE\/wHKIY7CDkf2\/DQ1vqGvk4smVe5cRDEmrLPCWi4FC8p40VUhSmWQ5udCm0zoJtorgWv3vbDQw0kKYkwn39ozAnQXDe+YvWMxkLFWA+O3TFwkJvdkIK+\/AUSnRssPKt5WHY0FhNOxnSPcLslEL4G4\/RfP95ve99U+kRnDy3X+KtzdQLY+u935ghON\/o3UE4IMv9oN6JX9RnxzL\/LRcOgnHigxStSGPKsZYtnz8RWNVT\/rOLAibqiWJadC5MYHRbekF3eg6FOGrQGkXYbsn0+a5aovnlLCbLwIqY9fcS17UX8J235iQ6cdmHNbrPeS84CMm34RA==&affiliate_id=1052423&strip_google_tagmanager=true\" loading=\"lazy\" data-with-title=\"true\" class=\"fiverr_nga_frame\" frameborder=\"0\" height=\"350\" width=\"100%\" referrerpolicy=\"no-referrer-when-downgrade\" data-mode=\"random_gigs\" onload=\" var frame = this; var script = document.createElement('script'); script.addEventListener('load', function() { window.FW_SDK.register(frame); }); script.setAttribute('src', 'https:\/\/www.fiverr.com\/gig_widgets\/sdk'); document.body.appendChild(script); \" ><\/iframe>\n<br \/><a href=\"https:\/\/www.cloudsavvyit.com\/15223\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Traefik is a leading reverse proxy and load balancer for cloud-native operations and containerized workloads. It functions as an edge router that publishes your services&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5988,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-5987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-universe"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog<\/title>\n<meta name=\"description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog\" \/>\n<meta property=\"og:description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/\" \/>\n<meta property=\"og:site_name\" content=\"mailinvest.blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/freelanceracademic\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-24T15:22:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1202\" \/>\n\t<meta property=\"og:image:height\" content=\"677\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@mailinvest.blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@mailinvest.blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/\"},\"author\":{\"name\":\"admin@mailinvest.blog\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\"},\"headline\":\"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT\",\"datePublished\":\"2022-01-24T15:22:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/\"},\"wordCount\":1108,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/0ff1b417.jpg\",\"articleSection\":[\"Tech Universe\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/\",\"name\":\"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/0ff1b417.jpg\",\"datePublished\":\"2022-01-24T15:22:32+00:00\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/0ff1b417.jpg\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/0ff1b417.jpg\",\"width\":1202,\"height\":677},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/24\\\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mailinvest.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"name\":\"mailinvest.blog\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mailinvest.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\",\"name\":\"mailinvest\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"width\":1000,\"height\":1000,\"caption\":\"mailinvest\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/freelanceracademic\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\",\"name\":\"admin@mailinvest.blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"caption\":\"admin@mailinvest.blog\"},\"sameAs\":[\"https:\\\/\\\/mailinvest.blog\",\"admin@mailinvest.blog\"],\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/author\\\/adminmailinvest-blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/","og_locale":"en_US","og_type":"article","og_title":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog","og_description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","og_url":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/","og_site_name":"mailinvest.blog","article_publisher":"https:\/\/www.facebook.com\/freelanceracademic\/","article_published_time":"2022-01-24T15:22:32+00:00","og_image":[{"width":1202,"height":677,"url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg","type":"image\/jpeg"}],"author":"admin@mailinvest.blog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin@mailinvest.blog","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#article","isPartOf":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/"},"author":{"name":"admin@mailinvest.blog","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4"},"headline":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT","datePublished":"2022-01-24T15:22:32+00:00","mainEntityOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/"},"wordCount":1108,"commentCount":0,"publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg","articleSection":["Tech Universe"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/","url":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/","name":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT - mailinvest.blog","isPartOf":{"@id":"https:\/\/mailinvest.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#primaryimage"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg","datePublished":"2022-01-24T15:22:32+00:00","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","breadcrumb":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#primaryimage","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/0ff1b417.jpg","width":1202,"height":677},{"@type":"BreadcrumbList","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/24\/how-to-route-traffic-to-docker-containers-with-traefik-reverse-proxy-cloudsavvy-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mailinvest.blog\/"},{"@type":"ListItem","position":2,"name":"How to Route Traffic to Docker Containers With Traefik Reverse Proxy \u2013 CloudSavvy IT"}]},{"@type":"WebSite","@id":"https:\/\/mailinvest.blog\/#website","url":"https:\/\/mailinvest.blog\/","name":"mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mailinvest.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mailinvest.blog\/#organization","name":"mailinvest","url":"https:\/\/mailinvest.blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","width":1000,"height":1000,"caption":"mailinvest"},"image":{"@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/freelanceracademic\/"]},{"@type":"Person","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4","name":"admin@mailinvest.blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","caption":"admin@mailinvest.blog"},"sameAs":["https:\/\/mailinvest.blog","admin@mailinvest.blog"],"url":"https:\/\/mailinvest.blog\/index.php\/author\/adminmailinvest-blog\/"}]}},"_links":{"self":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/5987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/comments?post=5987"}],"version-history":[{"count":0,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/5987\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media\/5988"}],"wp:attachment":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media?parent=5987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/categories?post=5987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/tags?post=5987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}