Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker needs a specific configuration to pull images behind a proxy #7249

Closed
nqb opened this issue Oct 5, 2022 · 2 comments · Fixed by #7946
Closed

Docker needs a specific configuration to pull images behind a proxy #7249

nqb opened this issue Oct 5, 2022 · 2 comments · Fixed by #7946

Comments

@nqb
Copy link
Contributor

nqb commented Oct 5, 2022

Is your feature request related to a problem? Please describe.
If your PacketFence server reach Internet through a proxy, installation will fail because pull of container images doesn't use system proxy.

https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

Describe the solution you'd like
Create a pre-start script in Docker which:

  • detect if a proxy is defined on the system (through environment variables)
  • create an environment file read by Docker to use these variables

Important: ISO installer should also work if somebody configured a proxy on the system.

Additional context
Current workaround:

  1. systemctl edit docker
[Service]
Environment="NO_PROXY=localhost, 127.0.0.0/8, ::1"
Environment="HTTP_PROXY=http://proxy.example.lan:9090"
Environment="HTTPS_PROXY=http://proxy.example.lan:9090"
  1. systemctl daemon-reload
  2. systemctl restart docker
@nqb
Copy link
Contributor Author

nqb commented Jan 6, 2023

It's necessary to use same recipe if you run Monit behind a proxy in order to have update.sh working. If you put your HTTP variables in local-vars, it will only work for run-all.sh script but not for update.sh itself.

@extrafu extrafu modified the milestones: PacketFence-13.0, PacketFence-13.1 Jun 14, 2023
@stegar123 stegar123 linked a pull request Dec 21, 2023 that will close this issue
@stegar123
Copy link
Contributor

docker version 23.0 and bigger support proxy env variable

https://docs.docker.com/engine/reference/commandline/dockerd/#proxy-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants