Docker on a Raspberry Pi

The guys at Hypriot did an awesome job to bring Docker to the Raspberry Pi world.

If you want to give it a try, you have two options

Option 1: Prebuilt images

Thats the best option if you want to have a full-fledged docker environment with optimized settings and hassle free installation.

Just download the image from this page and “burn” it to a sd-card. Plug the card in your RPi and enjoy.

Read more about this solution in their Blog: Get your all-in-one Docker playground now: HypriotOS reloaded!

Option 2: Debian Package

This option is the way you should go if you don’t have a spare sd-card around.

You can download a .dep file from this page and install it via dpkg -i package_name.deb

I tried this option on my current Jessie installation and encountered one problem: All docker command had to be issued via sudo. Thats because the docker.sock is only accessible for the root user. I didn’t follow up on this as i am going with option one 🙂

 

Quick test run? Here we go

After you have installed either the image version or the dep, you should be good to go for a first test.

Log in to your pi and kick of the following command:

docker run -d -p 8080:80 hypriot/rpi-busybox-httpd

Docker is now downloading the webserver image from the docker registry and start the container.

Now start your web browser and open http://<your-pi-ip>:8080

hyprion test docker images

 

Wait, there is one more thing

They also build an awesome hardware stack called “The Pi Tower” which consists of 4 Raspberry Pi 2 stacked on top of a 5-Port-Switch.

(c) 2015 hypriot
Pi Tower – (c) 2015 hypriot

Read more about this at their blog: Let Docker Swarm all over your Raspberry Pi Cluster

 

Downloads: http://blog.hypriot.com/downloads/

Installing WordPress on Dokku

To get WP up and running you have to prepare several things. This guide is based on a Dokku installation on a DigitalOcean Dropplet; for me the most convenient way to get a Dokku platform running.

Prepare your dokku environment

To make sure everything is on place, you should prepare your dokku environment.

1. Add your app

Create a app with the  dokku apps:create <appname> where appname is the sub domain of your dokku server.

2. Add a Database

I’ll use the official mariadb plugin for firing up a mysql database.

First add a new database by executing the following command  dokku mariadb:create .

Choose whatever you want for the databasename.

After firing the command, you should see a output like this:

Please note the line

  DSN: mysql://mariadb:2995cee44058d534@dokku-mariadb-my-wp-database:3306/my_wp_database 

we will need this information later to configure the WordPress database!

Now connect your database to your app. This step makes sure your app has access to the db.

dokku mariadb:link my_wp_database yourappname

Read More

Dockerize RabbitMQ

You want to run RabbitMQ in a Docker environment? You want MQTT and a nice web interface for administration?

Just use the Dockerfile and the hints in this post to get your server up and running in no time!

Beware: There are two very important points to keep in mind! If you miss even one of these steps, you will loose your configuration and users on every restart!

Read More