Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable userland-proxy for docker-compose

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.

like image 656
java.dev Avatar asked Jun 07 '17 13:06

java.dev


1 Answers

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)

like image 67
thaJeztah Avatar answered Sep 23 '22 16:09

thaJeztah