** Docker on Raspberri Pi/Orange Pi **
--
You will need:
- Raspberry Pi 3/Orange Pi
- 8GB Class 10 MicroSD card, the higher, the better, but with 8GB works!
- Internet connection
- Raspberry Pi connection to the Internet, wired or via Wifi
- Monitor, Keyboard and Mouse(Optional, you can do all over SSH protocol)
Note 0: From now on, I will call Raspberry Pi like RPI, and Orange Pi like OPI, as well. Shorter terms :P.
Note 1: Please if you want good and smooth performance, use a RPI 3 or 3 B+, older models runs docker poorly/slow and you can't see real performance.
Note 2: I will start saying that you need to flash Raspbian, lastest stable on your RPI.
According with model you should be able to download it from:
Image for RPI: https://www.raspberrypi.org/downloads/raspbian/
And flash it to microSD with dd/Etcher on linux environments.
dd: Is part of the **coreutils** package, comes by default in every GNU/Linux system.
Etcher: https://www.balena.io/etcher/
In Windows, you can use:
Win32DiskImager: https://sourceforge.net/projects/win32diskimager/
After flashing the microSD card, start the RPI, the system will reboot due to an expansion of microSD card space. Once it reboots, you can login with:
- Username: pi
- Password: raspberry
Change password por pi user, and configure the new system with:
raspi-config
First thing to do is to configure networking to access the internet and update the package database:
apt update
apt dist-upgrade
After, just install docker. First, add repo:
nano /etc/apt/sources.list.d/docker.conf
And add this line:
deb http://download.docker.com/linux/debian stretch stable
Install step:
apt update && apt upgrade
apt install docker-ce
Add docker to sudo group:
sudo usermod -aG docker pi
And your done! Start using your RPI with docker.
This step-by-step guide works on an Orange PI[OPI] pc, but with small changes:
OPI default credenctials:
- Username: root
- Password: 1234
The image to flash on the microSD card you have to download it from:
Image for OPI: https://www.armbian.com/orange-pi-pc/
According to the model you have to work with. By default OPIs, get a dynamic IP address over DHCP protocol, so you need to connect it to a router and scan[AngryIP Scanner can help you] the network to enter it, or with an HDMI monitor, configure networking manually, the network configuration is the same as RPI or any Debian based system.
AngryIP Scanner: https://angryip.org/download/
To configure OPI use:
armbian-config
Repo, the same. Nothing to change there.
- Tested on an Orange Pi Prime v1.0, one of the powerful ones!
** Important Notice about Docker on RPI/OPI **
This SoCs computers use ARM architecture, and as a result won't be compatible with all containers out of the box. Images will need to be built from an ARM base image.
So, if you see the following error, it means you are trying to run an X86 container on ARM machine i.e. Raspberry Pi. This is because the binary format used by ARM is not compatible with x86.
standard_init_linux.go:178: exec user process caused "exec format error"
And, to finish, I will say that the images built for the RPI work just fine on OPIs.