How to use local proxy settings in docker-compose : <p>I am setting up a new server for our Redmine installation, since the old installation was done by hand, which makes it difficult to update everything properly. I decided to go with a Docker image but am having trouble starting the docker container due to an error message. The host is running behind a proxy server, which I think, is causing this problem, as everything else such as wget, curl, etc. is working fine.</p>

<p>Error message:</p>

<pre><code>Pulling redmine (redmine:)...
ERROR: Get https://registry-1.docker.io/v2/: dial tcp 34.206.236.31:443: connect: connection refused
</code></pre>

<p>I searched on Google about using Docker/Docker-Compose with a proxy server in the background and found a few websites where people had the same issue but none of these really helped me with my problem.</p>

<p>I checked with the Docker documentation and found a guide but this does not seem to work for me: <a href="https://docs.docker.com/network/proxy/" rel="noreferrer">https://docs.docker.com/network/proxy/</a></p>

<p>I also found an answered question here on StackOverflow: <a href="https://stackoverflow.com/questions/53477114/using-proxy-on-docker-compose-in-server">Using proxy on docker-compose in server</a> which might be the solution I am after but I am unsure where exactly I have to put the solution. I guess the person means the docker-compose.yml file but I could be wrong.</p>

<p>This is what my docker-compose.yml looks like:</p>

<pre><code>version: '3.1'

services:

redmine:
 image: redmine
 restart: always
 ports:
   - 80:3000
 environment:
   REDMINE_DB_MYSQL: db
   REDMINE_DB_PASSWORD: SECRET_PASSWORD

db:
image: mysql:5.7
restart: always
environment:
  MYSQL_ROOT_PASSWORD: SECRET_PASSWORD
  MYSQL_DATABASE: redmine
</code></pre>

<p>I expect to run the following command without the above error message</p>

<pre><code>docker-compose -f docker-compose.yml up -d
</code></pre>
