I have pulled a docker image & run a container. To use internet I need to go through proxy. I have configured proxy at docker demon & system level. Once I start the container from that image it's showing unhealthy. service is running fine but container showing unhealthy. Docker demon & container can reach internet but container becomes unhealthy.. How can I make container healthy ?
This is how I configured Proxy at Docker:
At demon: [root@ ~]# systemctl edit docker
[Service]
Environment="HTTP_PROXY=http://Proxy_serverIP:Port"
Environment="HTTPS_PROXY=http://Proxy_serverIP:Port"
Environment="NO_PROXY=localhost,127.0.0.1"
At docker client: [root@ ~]# cat .docker/config.json
{
"proxies":
{
"default":
{
"httpProxy": "http://Proxy_Server_IP:Port",
"httpsProxy": "http://Proxy_Server_IP:Port",
"noProxy": "127.0.0.0/8"
}
}
}
Start Container:
docker run --env http_proxy="http://Proxy_serverIP:Port" --env https_proxy="http://Proxy_serverIP:Port" -d -p 80:80 -p 443:443 --volumes-from pmm-data-8 --name pmm-server-8 --restart always percona/pmm-server:2
Container status: [root@ ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2eab4e3afeb6 percona/pmm-server:2 "/opt/entrypoint.sh" 11 minutes ago Up 11 minutes (unhealthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp pmm-server-8
Container logs: [root@ ~]# docker logs pmm-server-8
WARN[2021-12-13T07:23:28.413+00:00] Configuration warning: unknown environment variable "http_proxy=http://Proxy_serverIP:Port".
WARN[2021-12-13T07:23:28.413+00:00] Configuration warning: unknown environment variable "https_proxy=http://Proxy_serverIP:Port".
2021-12-13 07:23:28,523 INFO Included extra file "/etc/supervisord.d/alertmanager.ini" during parsing
2021-12-13 07:23:28,524 INFO Included extra file "/etc/supervisord.d/dbaas-controller.ini" during parsing
Thanks