Originally, we need to install and configure lots of things on a host, no matter it is a traditional host or a VM, when we want to deploy the software or release a service. It is possible and not bad to do that only when we manage less than 5 hosts.
Personally, I hate and refuse to do that manually even when I play with the Raspberry Pi. Ex, here is the Ansible Playbook that I built to configure the Raspberry Pi in order to deploy Pi-Dashboard used to monitor the service running on Raspberry Pi.
automate the things and save your life!
And now, the container is much more popular, it makes the software development, deployment more agile and standardized. You may know Docker – Docker is the world’s leading software containerization platform, and it is committed to build, ship and run software anywhere. More about Docker, please read here What is Docker.
So how to setup and configure Docker on Raspberry?
- If you haven’t make the Pi to run, please refer to how to active your Raspberry Pi
sudo apt-get update sudo apt-get dist-upgrade sudo reboot
- Due to the OS Raspbian is not in the Docker supported list, but there is a script that we can use:
curl -sSL https://get.docker.com | sh
sudo docker version ps aux | grep docker
Play With Docker
Raspberry is based on ARMv7 architecture, and normal docker images are built with amd64. Please pull and run with the proper ARMv7 images here: ARMv7 Images.
Check your system information
uname -a # mine is here: # pi@raspberrypi:~ $ uname -a # Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
sudo docker run armhf/hello-world