-
Notifications
You must be signed in to change notification settings - Fork 96
linux
Felix Garcia Borrego edited this page May 6, 2015
·
10 revisions
We'll need to enable the Docker Remote API, but first make sure Docker daemon is up an running using docker info.
###Linux with systemd (Ubuntu 15.04, Debian 8,...)
Using systemd, we'll need to enable a systemd socket to access the Docker remote API:
- Create a new systemd config file called
/etc/systemd/system/docker-tcp.socketto make docker available on a TCP socket on port 2375.
[Unit]
Description=Docker HTTP Socket for the API
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]
WantedBy=sockets.target
- Register the new systemd http socket and restart docker
systemctl enable docker-tcp.socket
systemctl stop docker
systemctl start docker-tcp.socket
- Open your browser and verify you can connect to http://localhost:2375/_ping
You need to enable Docker Remote API. To do so you need to:
- Edit
/etc/default/dockerto allow connections adding:DOCKER_OPTS='-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock' - Restart the Docker service using:
sudo service docker restart - Open your browser and verify you can connect to http://localhost:2375/_ping