Visualize your Raspberry Pi containers with Portainer or UI for Docker

At home I use some Raspberry Pi’s for some home network services, and I run these services inside Docker containers. From time to time I want to see or manage one of these containers. But I’m too lazy to get to my laptop and use the Docker CLI for that. There are two nice Docker UI’s to access your Docker engine with a web browser. Let’s have a look at both.

Portainer

UI for Docker, formerly known as DockerUI

I have started using the DockerUI, an open source project from Michael Crosby and Kevan Ahlquist. You can find the source code on GitHub at https://github.com/kevana/ui-for-docker.

In my home setup I use Docker Compose to configure how to run my services.

This is my configuration to start the UI so I can reach it on port 80 of the Raspberry Pi.

ui:
  image: hypriot/rpi-dockerui
  restart: always
  volumes:
    - '/var/run/docker.sock:/var/run/docker.sock'
  expose:
    - 9000
  ports:
    - 80:9000

As you can see we provide a Docker image hypriot/rpi-dockerui on the Docker hub so it is very easy to use it in your environment.

So let’s have a look at the dashboard which shows you an overview of your running or stopped containers:

DockerUI Dashboard

You can click on each container and see more details and so some actions with them like stopping and starting them again.

DockerUI Container

The UI provides some more views to list for example all local Docker images and information about your Docker engine.

DockerUI Images

Portainer

Last week I found portainer.io which also looks very good. They provide Docker images for Linux and Windows, but not for ARM right now and as well an image for ARM.

The source code is also available on GitHub https://github.com/portainer/portainer and it’s based on the work of DockerUI.

The pull request to add Linux ARM support was merged and now you can get the Docker image for the Rapsberry Pi using the image portainer/portainer:arm.

Just use the same Docker Compose sample from above and replace the image name. Killing the old container and running a new one with docker-compose up -d ui you have Portainer up and running.

The dashboard also gives you an overview of all running containers, all images etc.

Portainer Dashboard

In the container list you can see all running and stopped containers as well as some actions you can do with it.

Portainer Dashboard

Clicking on one of the running containers you have access to the details, environment variables, port mappings, volumes. You can also access some CPU/memory and network statistics as well as the logs of your container, as well as the processes running inside the container.

Portainer Stats

Conclusion

If you want to remote control your Raspberry Pi Docker containers from a nice Web UI, then try one of these prebuilt Docker images. Of course be aware that everyone in your home network is able to manipulate your Docker containers with it as there is no login dialog. But for some private projects it is still an advantage to simplify starting and stopping containers from your mobile phone.

As always use the comments below to give us feedback and share it on Twitter or Facebook.

Stefan @stefscherer

comments powered by Disqus