{"id":16745,"date":"2017-03-30T12:15:34","date_gmt":"2017-03-30T09:15:34","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=16745"},"modified":"2017-03-29T11:23:08","modified_gmt":"2017-03-29T08:23:08","slug":"using-docker-behind-proxy","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/","title":{"rendered":"Using Docker Behind a Proxy"},"content":{"rendered":"<p>In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use Docker without direct internet access.<\/p>\n<p>By default, Docker assumes that the system running Docker and executing Docker commands has general access to the internet. Often in large corporate networks this is simply not the case. More often than not, a corporate network will route all internet traffic through a proxy.<\/p>\n<p>While this setup is generally transparent to the end user, this type of network environment often neglects command line tools such as Docker. For today\u2019s article, we will use Docker to build and run a simple container within a \u201clocked down\u201d network.<\/p>\n<h2>A Simple Example of Working with a Proxy<\/h2>\n<p>In this article, we will be building a simple <code>ubuntu<\/code>-based container that uses <code>apt-get<\/code> to install <code>curl<\/code>. While this example is simple, it will require us to leverage a proxy in several ways.<\/p>\n<p>Before jumping into the proxy settings however, let\u2019s take a quick look at the <code>Dockerfile<\/code> we will be building from.<\/p>\n<pre class=\"brush:php\">FROM ubuntu\r\n\r\nRUN apt-get update &amp;&amp; apt-get install -y curl<\/pre>\n<p>The above <code>Dockerfile<\/code> only has two instructions: <code>FROM<\/code>, which is used to specify which base image to build the container from, and <code>RUN<\/code>. <code>RUN<\/code> is used to execute commands, in this case <code>apt-get<\/code> commands.<\/p>\n<p>Let\u2019s go ahead and attempt to execute a <code>docker build<\/code> to see what happens by default in a \u201clocked down\u201d network.<\/p>\n<pre class=\"brush:php\">$ sudo docker build -t curl .\r\nSending build context to Docker daemon 12.29 kB\r\nSending build context to Docker daemon\r\nStep 0 : FROM ubuntu\r\nPulling repository ubuntu\r\nINFO[0002] Get https:\/\/index.docker.io\/v1\/repositories\/library\/ubuntu\/images: dial tcp 52.22.146.88:443: connection refused<\/pre>\n<p>From the above execution, we can see that the <code>docker build<\/code> results in a download error of the base <code>ubuntu<\/code> image. The reason is also pretty obvious: access to <code>docker.io<\/code> was blocked.<\/p>\n<p>In order for this to work within our network, Docker will need to route its request through a proxy. This will allow Docker to indirectly communicate with <code>docker.io<\/code>.<\/p>\n<h2>Configuring Docker to Use a Proxy<\/h2>\n<p>On Ubuntu (which is the OS our Docker host is running), we can configure Docker to do this by simply editing the <code>\/etc\/default\/docker<\/code> file.<\/p>\n<pre class=\"brush:php\"># If you need Docker to use an HTTP proxy, it can also be specified here.\r\n#export http_proxy=\"http:\/\/127.0.0.1:3128\/\"<\/pre>\n<p>Within the <code>\/etc\/default\/docker<\/code> file, there is a line that is commented by default which specifies the <code>http_proxy<\/code> environmental variable.<\/p>\n<p>In order to route Docker traffic through a proxy, we will need to uncomment this line and replace the default value with our proxy address.<\/p>\n<pre class=\"brush:php\"># If you need Docker to use an HTTP proxy, it can also be specified here.\r\nexport http_proxy=\"http:\/\/192.168.33.10:3128\/\"<\/pre>\n<p>In the above, we specify using the proxy located at <code>192.168.33.10:3128<\/code>. This proxy is a simple <strong>Squid<\/strong> proxy created using the <code>sameersbn\/squid:3.3.8-23<\/code> Docker container.<\/p>\n<p>This proxy is not currently set up for <strong>username<\/strong>\u2013 or <strong>password<\/strong>-based authentication. However, if it was we could add those details using the <code>https:\/\/username:password@192.168.33.10:3128\/<\/code> format.<\/p>\n<p>With changes made to <code>\/etc\/default\/docker<\/code>, we need to restart the Docker service before our changes will take effect.<\/p>\n<p>We can do this by executing the <code>service<\/code> command.<\/p>\n<pre class=\"brush:php\"># service docker restart\r\ndocker stop\/waiting\r\ndocker start\/running, process 32703<\/pre>\n<p>With our changes in effect, let\u2019s go ahead and see what happens when executing a <code>docker build<\/code> command.<\/p>\n<pre class=\"brush:php\">$ sudo docker build -t curl .\r\nSending build context to Docker daemon 10.75 kB\r\nSending build context to Docker daemon\r\nStep 0 : FROM ubuntu\r\nlatest: Pulling from ubuntu\r\n2a2723a6e328: Pull complete\r\nfa1b78b7309e: Pull complete\r\n0ce8ddcea421: Pull complete\r\nc4cb212fd6fe: Pull complete\r\n109d5efde28a: Pull complete\r\n7f06d5cab2df: Pull complete\r\nDigest: sha256:f649e49c1ed34607912626a152efbc23238678af1ac37859b6223ef28e711a3f\r\nStatus: Downloaded newer image for ubuntu:latest\r\n ---&gt; 7f06d5cab2df\r\nStep 1 : RUN apt-get update &amp;&amp; apt-get install -y curl\r\n ---&gt; Running in 39b964be90bc\r\nErr:1 http:\/\/archive.ubuntu.com\/ubuntu xenial InRelease\r\n  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::17). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8001::17 80]\r\nW: Failed to fetch http:\/\/archive.ubuntu.com\/ubuntu\/dists\/xenial\/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::17). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8001::17 80]\r\nW: Some index files failed to download. They have been ignored, or old ones used instead.\r\nReading package lists...\r\nBuilding dependency tree...\r\nReading state information...\r\nE: Unable to locate package curl\r\nINFO[0013] The command [\/bin\/sh -c apt-get update &amp;&amp; apt-get install -y curl] returned a non-zero code: 100<\/pre>\n<p>From the above build output, we can see that Docker was able to pull the <code>ubuntu<\/code> image successfully. However, our build still failed due to connectivity issues.<\/p>\n<p>Specifically, our build failed during the <code>apt-get<\/code> command execution.<\/p>\n<p>The reason the build failed is because even though we configured Docker itself to use a proxy, the operating environment within the container is not configured to use a proxy. This means when <code>apt-get<\/code> was executed within the container, it attempted to go directly to the internet without routing through the proxy.<\/p>\n<p>In cases like this, it is important to remember that sometimes containers need to be treated in the same way we would treat any other system. The internal container environment works as if it is independent of the host system. That means configurations that exist on the host do not necessarily exist within the container. Our proxy is a prime example of that in practice.<\/p>\n<p>To that end, if we were to stand up a physical or virtual machine with Ubuntu installed in this network environment, we would need to configure <code>apt-get<\/code> on that system to utilize a proxy. Just like we configured Docker to utilize a proxy.<\/p>\n<p>The same is true for the container we are building. Luckily, configuring a proxy for <code>apt-get<\/code> is pretty easy.<\/p>\n<h2>Configuring apt-get to Use a Proxy<\/h2>\n<p>We simply need to set the <code>http_proxy<\/code> and <code>https_proxy<\/code> environmental variables during build time. We can do this with the <code>docker build<\/code> command itself.<\/p>\n<pre class=\"brush:php\">$ sudo docker build -t curl --build-arg http_proxy=http:\/\/192.168.33.10:3128 .<\/pre>\n<p>Or we can specify the <code>http_proxy<\/code> value using the <code>ENV<\/code> instruction within the <code>Dockerfile<\/code>.<\/p>\n<pre class=\"brush:php\">FROM ubuntu\r\n\r\nENV http_proxy \"http:\/\/192.168.33.10:3128\"\r\nENV https_proxy \"http:\/\/192.168.33.10:3128\"\r\nRUN apt-get update &amp;&amp; apt-get install -y curl<\/pre>\n<p>Both options are useful in different situations, but for this article we will specify the values within our <code>Dockerfile<\/code>.<\/p>\n<h3>Testing the proxy settings<\/h3>\n<p>With the <code>http_proxy<\/code> and <code>https_proxy<\/code> environmental variables added, let\u2019s rerun our build.<\/p>\n<pre class=\"brush:php\">$ sudo docker build -t curl .\r\nSending build context to Docker daemon 10.75 kB\r\nSending build context to Docker daemon\r\nStep 0 : FROM ubuntu\r\nlatest: Pulling from ubuntu\r\n2a2723a6e328: Pull complete\r\nfa1b78b7309e: Pull complete\r\n0ce8ddcea421: Pull complete\r\nc4cb212fd6fe: Pull complete\r\n109d5efde28a: Pull complete\r\n7f06d5cab2df: Pull complete\r\nDigest: sha256:f649e49c1ed34607912626a152efbc23238678af1ac37859b6223ef28e711a3f\r\nStatus: Downloaded newer image for ubuntu:latest\r\n ---&gt; 7f06d5cab2df\r\nStep 1 : ENV http_proxy \"http:\/\/192.168.33.10:3128\"\r\n ---&gt; Running in 6d66226a7cbf\r\n ---&gt; 89fab90c9ca2\r\nRemoving intermediate container 6d66226a7cbf\r\nStep 2 : ENV https_proxy \"http:\/\/192.168.33.10:3128\"\r\n ---&gt; Running in ce80b9502a59\r\n ---&gt; c490a0c49b2b\r\nRemoving intermediate container ce80b9502a59\r\nStep 3 : RUN apt-get update &amp;&amp; apt-get install -y curl\r\n ---&gt; Running in 2eb328075f7e\r\nGet:1 http:\/\/archive.ubuntu.com\/ubuntu xenial InRelease [247 kB]\r\nGet:2 http:\/\/archive.ubuntu.com\/ubuntu xenial-updates InRelease [102 kB]\r\nGet:3 http:\/\/archive.ubuntu.com\/ubuntu xenial-security InRelease [102 kB]\r\nGet:4 http:\/\/archive.ubuntu.com\/ubuntu xenial\/main Sources [1103 kB]\r\nGet:5 http:\/\/archive.ubuntu.com\/ubuntu xenial\/restricted Sources [5179 B]<\/pre>\n<p>From the above, it appears our build was successful. Let\u2019s go ahead and <code>run<\/code> this container.<\/p>\n<pre class=\"brush:php\">$ sudo docker run curl curl -v http:\/\/blog.codeship.com\r\n* Rebuilt URL to: http:\/\/blog.codeship.com\/\r\n*   Trying 192.168.33.10...\r\n&gt; GET http:\/\/blog.codeship.com\/ HTTP\/1.1\r\n&gt; Host: blog.codeship.com\r\n&gt; User-Agent: curl\/7.47.0\r\n&gt; Accept: *\/*\r\n&gt; Proxy-Connection: Keep-Alive\r\n&gt;\r\n&lt; HTTP\/1.1 301 Moved Permanently\r\n&lt; Server: nginx\r\n&lt; Date: Wed, 22 Mar 2017 00:45:04 GMT\r\n&lt; Content-Type: text\/html\r\n&lt; Content-Length: 178\r\n&lt; Location: https:\/\/blog.codeship.com\/<\/pre>\n<p>With the above <code>curl<\/code> command output, we can see that our request to <code>http:\/\/blog.codeship.com<\/code> was also proxied through the <code>192.168.33.10<\/code> proxy server. The reason for this is based on the way we specified the proxies within the container. The <code>curl<\/code> command like <code>apt-get<\/code>, uses the <code>http_proxy<\/code> and <code>https_proxy<\/code> environmental variables.<\/p>\n<p>It is important to remember that these values not only affect the container during build but also during execution. If for some reason we did not want to use this proxy during the execution of the container, we would need to reset the <code>http_proxy<\/code> and <code>https_proxy<\/code> values by either passing new values during <code>docker run<\/code> execution or by changing our <code>Dockerfile<\/code> to match the below.<\/p>\n<pre class=\"brush:php\">FROM ubuntu\r\n\r\nENV http_proxy \"http:\/\/192.168.33.10:3128\"\r\nENV https_proxy \"http:\/\/192.168.33.10:3128\"\r\nRUN apt-get update &amp;&amp; apt-get install -y curl\r\nENV http_proxy \"\"\r\nENV https_proxy \"\"<\/pre>\n<p>With the above, when the container is launched with <code>docker run<\/code>, the <code>http_proxy<\/code> and <code>https_proxy<\/code> values will be unset, allowing the container to route traffic without going through a proxy.<\/p>\n<h2>Summary<\/h2>\n<p>In this article, we covered how to configure Docker (<strong>on Ubuntu<\/strong>) to use a proxy to download container images. We also explored how to configure <code>apt-get<\/code> within the container to use a proxy and why it is necessary.<\/p>\n<p>While this is useful for Ubuntu laptops and hosts running Docker, many people use the Docker for Mac &amp; Windows application. Luckily, the proxy configuration for Docker for Mac &amp; Windows is pretty easy as well. In fact, it is part of the Docker preferences configuration.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy.png\"><img decoding=\"async\" class=\"aligncenter wp-image-16747\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy.png\" alt=\"\" width=\"860\" height=\"1078\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy.png 984w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy-239x300.png 239w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy-768x963.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/03\/docker-proxy-817x1024.png 817w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>In the Docker preferences, there is an option for <em>Proxies<\/em>. If you simply click this option, you can add both an <code>HTTP<\/code> and <code>HTTPS<\/code> proxy using the <em>Manual proxy configuration<\/em> option.<\/p>\n<p>This setting will allow you to pull images from <code>docker.io<\/code>, however, it does not replace configuring the proxy within the container. That step is required regardless of where the container is built<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/blog.codeship.com\/using-docker-behind-a-proxy\/\">Using Docker Behind a Proxy<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a>\u00a0Ben Cane at the <a href=\"http:\/\/blog.codeship.com\/\">Codeship Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use Docker without direct internet access. By default, Docker assumes that the system running Docker and executing Docker commands has general access to the internet. Often in large corporate &hellip;<\/p>\n","protected":false},"author":158,"featured_media":10356,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[217],"class_list":["post-16745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Docker Behind a Proxy - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Docker Behind a Proxy - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-30T09:15:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Benjamin Cane\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin Cane\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\"},\"author\":{\"name\":\"Benjamin Cane\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8\"},\"headline\":\"Using Docker Behind a Proxy\",\"datePublished\":\"2017-03-30T09:15:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\"},\"wordCount\":1035,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"keywords\":[\"Docker\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\",\"name\":\"Using Docker Behind a Proxy - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"datePublished\":\"2017-03-30T09:15:34+00:00\",\"description\":\"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using Docker Behind a Proxy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8\",\"name\":\"Benjamin Cane\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g\",\"caption\":\"Benjamin Cane\"},\"description\":\"Benjamin Cane is a systems architect in the financial services industry. He writes about Linux systems administration on his blog and has recently published his first book, Red Hat Enterprise Linux Troubleshooting Guide.\",\"url\":\"https:\/\/www.webcodegeeks.com\/author\/benjamin-cane\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Docker Behind a Proxy - Web Code Geeks - 2026","description":"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use","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:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/","og_locale":"en_US","og_type":"article","og_title":"Using Docker Behind a Proxy - Web Code Geeks - 2026","og_description":"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use","og_url":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-03-30T09:15:34+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Benjamin Cane","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Benjamin Cane","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/"},"author":{"name":"Benjamin Cane","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8"},"headline":"Using Docker Behind a Proxy","datePublished":"2017-03-30T09:15:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/"},"wordCount":1035,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","keywords":["Docker"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/","url":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/","name":"Using Docker Behind a Proxy - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","datePublished":"2017-03-30T09:15:34+00:00","description":"In today\u2019s article, I am going to explore a common pain point for anyone running Docker in a large corporate environment. Today I\u2019ll show how to use","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/devops\/using-docker-behind-proxy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.webcodegeeks.com\/category\/devops\/"},{"@type":"ListItem","position":3,"name":"Using Docker Behind a Proxy"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8","name":"Benjamin Cane","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g","caption":"Benjamin Cane"},"description":"Benjamin Cane is a systems architect in the financial services industry. He writes about Linux systems administration on his blog and has recently published his first book, Red Hat Enterprise Linux Troubleshooting Guide.","url":"https:\/\/www.webcodegeeks.com\/author\/benjamin-cane\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/16745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/158"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=16745"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/16745\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/10356"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=16745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=16745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=16745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}