-
Notifications
You must be signed in to change notification settings - Fork 86
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
Proxy not working if password contains special character(%) #1149
Comments
I suspect the |
Problem solved!
|
Perfect! Worth noting as well that there's no standard definition for the naming of these env-vars; IIRC, the daemon itself will look both for lowercase ( To have containers started automatically with these env-vars set, you may be interested in docker/cli#93 Finally, I should warn that environment variables are known to "leak", so besides |
If someone meet this problem, docker/docs#11701 will answer why we need double % |
Expected behavior
Docker should accept special characters used in proxy password.
Actual behavior
I installed docker engine on Ubuntu 18.04, which is behind corporate proxy. I configured proxy for docker, but failed to take effect due to the password contains a special character("%").
Steps to reproduce the behavior
Create
/etc/systemd/system/docker.service.d/http-proxy.conf
file, and input below Environment variables:And then run
The proxy setting shows as below:
Please note: the user name and password mask is copied from original docker info output. I assume this means docker accepts the proxy authentication setting.
But, if there is "%" sign in the password,
/var/log/syslog
prints error message as below after runsudo systemctl daemon-reload
.And there is not proxy setting in the output of
docker info
.If I change the password to
abc%%G4g
, escape "%" by prefixing another "%" sign, and then reload the daemon and restart docker. The syslog shows error message:and the docker info output contains proxy setting as below:
This time user name and password are not masked, and the test
docker run hello-world
failed due to connection time out.*Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
The text was updated successfully, but these errors were encountered: