Skip to content
Steven edited this page May 4, 2017 · 2 revisions

How to connect Docker UI with the Docker Remote API

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.socket to 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

Linux without systemd

You need to enable Docker Remote API. To do so you need to:

  • Edit /etc/default/docker to 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

Docker (easy!)

  • Download: docker pull jarkt/docker-remote-api
  • Run: docker run -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock --name docker-remote-api jarkt/docker-remote-api
  • Start/Stop
    Start: docker start docker-remote-api
    Stop: docker stop docker-remote-api