Hi,
I want to know how to disable Docker to listen on the TCP port. I tried to edit the daemon.json file, but I don’t see any value mentioned for the tcp port inside the file. Is there any other way we can do these tasks?
What platform are you doing this on? The answer will vary depending upon whether you’re doing this on Linux or MacOS (which is Linux-like in this regard), or on Windows.
On a Unix style platform, you’ll need to create or edit /etc/docker/daemon.json. If a TCP socket is mentioned in the hosts: key, then remove it. The final file should look something like:
{
"hosts": ["unix:///var/run/docker.sock"]
}
Ok thanks for your response. I will check it
Hi,
Do we need to edit this file and add below content along with the above-mentioned steps or no need? '/etc/systemd/system/docker.service.d/.#override.conf'
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock
I’m confused as to what you’re doing and where you’re doing it. Is there a lab you’re working on here (if so, a link would be helpful) or if not, what other system you’re doing it on. I’m not sure that /etc/systemd/system/docker.service.d/.#override.conf is a valid file to be modifying for systemd.