Docker is not honoring configuration to listen on tcp socket

Asked by Daniel

I would like to configure docker to listen on port tcp://0.0.0.0:2375.
I have tried different configuration options like /etc/docker/daemon.json and /etc/default/docker with
DOCKER_OPTS="--host unix:///var/run/docker.sock --host tcp://0.0.0.0:2375 --dns 1.2.3.4"
but docker will never use the tcp settings.

The only way I have found that works is to change /etc/systemd/system/multi-user.target.wants/docker.service
BUT this file is replaced every time there is a new version.

What is the correct way to configure docker to listen on 'tcp://0.0.0.0:2375' and specify dns???

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu docker Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Daniel for more information if necessary.

To post a message you must log in.