How to remove old and unused Docker images

(original answer see below) Update Sept. 2016: Docker 1.13: PR 26108 and commit 86de7c0 introduce a few new commands to help facilitate visualizing how much space the docker daemon data is taking on disk and allowing for easily cleaning up “unneeded” excess. docker system prune will delete ALL dangling data (i.e. In order: containers stopped, … Read more

How to get a Docker container’s IP address from the host

The –format option of inspect comes to the rescue. Modern Docker client syntax is: docker inspect -f ‘{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ container_name_or_id Old Docker client syntax is: docker inspect –format ‘{{ .NetworkSettings.IPAddress }}’ container_name_or_id These commands will return the Docker container’s IP address. As mentioned in the comments: if you are on Windows, use double quotes ” instead … Read more

Communication between multiple docker-compose projects

You just need to make sure that the containers you want to talk to each other are on the same network. Networks are a first-class docker construct, and not specific to compose. # front/docker-compose.yml version: ‘2’ services: front: … networks: – some-net networks: some-net: driver: bridge … # api/docker-compose.yml version: ‘2’ services: api: … networks: … Read more

Can you run GUI applications in a Linux Docker container?

You can simply install a vncserver along with Firefox 🙂 I pushed an image, vnc/firefox, here: docker pull creack/firefox-vnc The image has been made with this Dockerfile: # Firefox over VNC # # VERSION 0.1 # DOCKER-VERSION 0.2 FROM ubuntu:12.04 # Make sure the package repository is up to date RUN echo “deb http://archive.ubuntu.com/ubuntu precise … Read more