How to disable "userland-proxy" so that when using "docker-compose" it is disabled.
I tried running docker-compose up --userland-proxy=false but no luck.
Disabling the Userland proxy is a global configuration, configured at the daemon level. You cannot change this configuration from the client, and thus not from docker compose.
To disable the proxy, you need to change the daemon configuration (see the dockerd reference
. You can do so following the steps below (these steps should be done on the host that the daemon runs);
Create a file named /etc/docker/daemon.json
if it does not exist, and add the "userland-proxy": false
setting. The daemon.json
file should be valid JSON; if this is the only configuration in that file, it should look like;
{
"userland-proxy": false
}
After saving the file, restart the daemon using (if your host uses systemd
);
sudo systemctl restart docker
Note: On Docker for Mac and Docker for Windows, the userland-proxy cannot be disabled, as it is an essential part of the networking (i.e. it allows connections to
localhost
to be forwarded to the containers)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With