Skip to content

Docker using HTTP proxy #85

@ffletcherr

Description

@ffletcherr

This is not an issue. Just instructions and bash scripts to force docker to use (HTTP) proxy. Based on this StackOverflow answer:

https://stackoverflow.com/a/28093517/11927768

Run this to start using proxy:

#!/bin/bash
sudo mkdir /etc/systemd/system/docker.service.d
echo "[Service]
Environment=HTTP_PROXY=http://127.0.0.1:1080
Environment=HTTPS_PROXY=http://127.0.0.1:1080" | sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf
sudo systemctl daemon-reload
sudo systemctl restart docker

** change 1080 to match your HTTP proxy port.

Run this to stop using proxy:

#!/bin/bash
sudo rm /etc/systemd/system/docker.service.d/http-proxy.conf
sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf
sudo systemctl daemon-reload
sudo systemctl restart docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions