Created
September 9, 2018 15:50
-
-
Save r6m/0c3fe38c1a5802a88b7ecb874a940a9a to your computer and use it in GitHub Desktop.
docker expose api and TCP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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