docker pull
mkdir /etc/systemd/system/docker.service.d
cat << EOL > /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://192.168.0.99:8888"
EOL
sudo systemctl daemon-reload
sudo systemctl restart docker
systemctl show --property=Environment docker
docker pull ubuntu:20.04
docker run
docker run \
-it --rm \
-e http_proxy="http://192.168.0.99:8888" \
-e https_proxy="http://192.168.0.99:8888" \
-v $(pwd)/deb:/deb \
ubuntu:20.04 /bin/bash
ホストのProxy設定
~/.bashrc
export http_proxy="http://192.168.0.99:8888"
export https_proxy=$http_proxy
export no_proxy=localhost,.example.com