Docker: Enable API: Difference between revisions
From wiki.jacobjohns.com
jwiki>jjohns Numbered |
jwiki>jjohns No edit summary |
||
| Line 8: | Line 8: | ||
ExecStart= | ExecStart= | ||
ExecStart=/usr/bin/dockerd | ExecStart=/usr/bin/dockerd | ||
2. Create <code>/etc/docker/daemon.json</code> with the below: | 2. Create <code>/etc/docker/daemon.json</code> with the below: | ||
{ | { | ||
"hosts": ["unix:///var/run/docker.sock", "tcp://<HostIP>:2375"] | "hosts": ["unix:///var/run/docker.sock", "tcp://<HostIP>:2375"] | ||
} | } | ||
3.Restart docker: <code>systemctl restart docker</code> | 3.Restart docker: <code>systemctl restart docker</code> | ||
Revision as of 14:47, 24 June 2023

Enable Docker API
- Edit the docker.service:
sudo systemctl edit docker.service- Add the below above the '### Lines below this comment will be discarded line':
[Service] ExecStart= ExecStart=/usr/bin/dockerd
2. Create /etc/docker/daemon.json with the below:
{
"hosts": ["unix:///var/run/docker.sock", "tcp://<HostIP>:2375"]
}
3.Restart docker: systemctl restart docker
