openrc docker init does not use system proxy
dockerd started by /etc/init.d/docker does not honor the proxy configured by setup-proxy.
-
repro:
-
setup-proxy http://192.0.2.1:8080
-
rc-service docker restart
-
docker pull alpine:latest
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp 34.200.90.16:443: connect: network is unreachable -
fix:
load proxy environment variables in /etc/init.d/docker
—- /etc/init.d/docker.orig
+ /etc/init.d/docker
@@ –32,5 +32,9 @@
# in the kernel. We recommend using cgroups to do container-local accounting.
ulimit -p unlimited
+ if -e /etc/profile.d/proxy.sh; then
- source /etc/profile.d/proxy.sh
- fi
return 0
}
(from redmine: issue id 8726, created on 2018-03-25)