Last active
April 11, 2017 04:09
-
-
Save frankmanzhu/c4c004415bf675cb6cc167b1c999cccb to your computer and use it in GitHub Desktop.
Enable the remote API on a new socket
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
| Enable the remote API on a new socket | |
| Create a file called /etc/systemd/system/docker-tcp.socket to make Docker available on a TCP socket on port 2375. | |
| [Unit] | |
| Description=Docker Socket for the API | |
| [Socket] | |
| ListenStream=2375 | |
| BindIPv6Only=both | |
| Service=docker.service | |
| [Install] | |
| WantedBy=sockets.target | |
| Then enable this new socket: | |
| systemctl enable docker-tcp.socket | |
| systemctl stop docker | |
| systemctl start docker-tcp.socket | |
| systemctl start docker | |
| Test that it's working: | |
| docker -H tcp://127.0.0.1:2375 ps | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment