Portainer does not take into account the ~/.docker/config.json
, especially regarding proxies definition
#8715
Labels
~/.docker/config.json
, especially regarding proxies definition
#8715
Bug description
Portainer does not use the docker configuration defined for the user that is running portainer. And it is not possible to configure the HTTP_PROXY and HTTPS_PROXY used by stacks deployed by portainer.
~/.docker/config.json
is not picked up by portainerHTTP_PROXY
on the portainer container does not enable this proxy in containers started from portainer (I guess it onlyHere is the
~/.docker/config.json
file I defined:Obviously when running
docker compose up
from my terminal with my user docker uses the proxies defined in~/.docker/config.json
But this does not happen when deploying a stack through portainer.
And forces us to manually configure the
HTTP_PROXY
andHTTPS_PROXY
environment variable for each container. Which is not ideal for reusability of the containers.Expected behavior
Portainer should use the config defined at
~/.docker/config.json
, at least for the proxies config (it's in the home folder, so there is no reason portainer can't read it no?). Here is the official docker docs for this config file: https://docs.docker.com/network/proxy/#configure-the-docker-clientIn general ideally portainer should not add any weird behavior that differ from running
docker compose
directly from the terminal.docker compose
automatically sets the right proxy, but not when run through portainer, meaning portainer is probably adding an unexpected layer of configuration on top of the configuration that have been defined for the server.Steps to reproduce the issue:
~/.docker/config.json
for a broken proxy URLTechnical details:
docker run -p 9443:9443 portainer/portainer
):Additional context
Only found this issue #469 about configuring the
HTTP_PROXY
of the portainer container, but that's not the same as having portainer behaving as expected following the global docker config.Any idea how could this be fixed? Could it be due to the fact we use rootless docker? (maybe rootless puts the
.docker/config.json
file at a different spot than what you are used to)The text was updated successfully, but these errors were encountered: