Hypriot offers an Raspberry Pi image to run docker.

However, by default docker doesn’t listen on a network port which would allow to conveniently run docker commands from another host.

Make docker listen on network interface

Edit file: /lib/systemd/system/docker.service

Replace line

# Old
ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS
# New
ExecStart=/usr/bin/docker daemon -H tcp:// $DOCKER_OPTS

Either restart docker (sudo service docker restart) or your Pi.

Remote docker run

Now you can run “docker build” and “docker run” on another computer with DOCKER_HOST=%IP_OF_HYPRIOT%:2375 set.

DOCKER_HOST= docker run -it --rm ubuntu:14.04 /bin/echo 'Hello world'