Configure Docker to use a proxy server | Docker Documentation
docs.docker.com › network › proxyIf your container needs to use an HTTP, HTTPS, or FTP proxy server, you can configure it in different ways: In Docker 17.07 and higher, you can configure the Docker client to pass proxy information to containers automatically. In Docker 17.06 and earlier versions, you must set the appropriate environment variables within the container. You can do this when you build the image (which makes the image less portable) or when you create or run the container.