Skip to content

Instantly share code, notes, and snippets.

@r6m
Created September 9, 2018 15:50
Show Gist options
  • Save r6m/0c3fe38c1a5802a88b7ecb874a940a9a to your computer and use it in GitHub Desktop.
Save r6m/0c3fe38c1a5802a88b7ecb874a940a9a to your computer and use it in GitHub Desktop.
docker expose api and TCP
sudo systemctl edit docker
# add the following lines to opened file
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock
sudo systemctl daemon-reload
sudo systemctl restart docker
# check the connection
docker -H tcp://0.0.0.0:2376 ps -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment