Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

How can I help test Docker for RPi? #17

Open
alexellis opened this issue Aug 20, 2017 · 4 comments
Open

How can I help test Docker for RPi? #17

alexellis opened this issue Aug 20, 2017 · 4 comments

Comments

@alexellis
Copy link
Owner

alexellis commented Aug 20, 2017

The last official Docker binaries for Raspberry Pi (Raspbian) were released in May at version 17.05. 17.05 is fully working including Docker Swarm and is available via curl -sSL get.docker.com | sh.

Support was going to be dropped for Raspbian (and ARMv6) from 17.05 onwards, but fortunately the decision was re-considered.

We need to test Docker 17.07 RC on Raspbian Jessie and Stretch on the ARMv6 (Pi Zero/B/B+) and ARMv7 (RPi 2/3) platforms. Unfortunately this may mean building from source which can take some time and can be tricky on a small device.

Please setup an environment with instructions in #16

Then pick one or all of the following issues:

@praseodym
Copy link

With rebranding to Docker CE, a new repository was introduced with a new docker-ce package (instead of docker-engine). Docker CE 17.06 works fine on Raspbian using the official instructions for Debian: https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-using-the-repository

@vattybear
Copy link

I have successfully tested these on Raspberry Pi 3 - some details below.

Device : Raspberry Pi 3
Linux red_pi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

High Level Instructions

Prep Device

  • Downloaded latest Raspbian Stretch image from : https://www.raspberrypi.org/downloads/raspbian/
  • used the full desktop version instead of lite version
  • Used etcher.io to flash image onto a 32gb MicroSD card (Samsung) - anything smaller may do but I found these far more stable in the longer run
  • Attach a decent power supply to Raspberry Pi 3, used spare keyboard, mouse, HDMI monitor instead of trying to do this headless
  • Boot Raspberry Pi from MicroSD card and go through install
  • Connect to WiFi
  • Update device (sudo apt-get update && sudo apt-get upgrade) and add swap file / reduce graphics memory as per Tune-up/checking for building Docker #16 as required
  • Also update keyboard preferences / locale / extend partitions if required

Install Dependencies

  • Need to install Docker CE first as build is executed inside a docker image (for dependencies I assume)
  • Used high level instructions from https://docs.docker.com/engine/installation/linux/docker-ce/debian/ following instructions for armhf (using the amd64 steps will cause errors as I found out with the trying to run the wrong docker image)
  • Since this is a fresh install - no previous version of docker to uninstall
  • In Step 4 - replace stable with edge
  • Add pi user to "docker" group to avoid having to prefix everything with sudo (I am used to typing everything under sudo anyway)

Checkout all necessary code and build

$git clone https://github.com/moby/moby

  • now we are looking to test a specific PR so lets get that
    $ git fetch origin pull/34021/head:dont-set-architecture-constraint
    $ git checkout dont-set-architecture-constraint
    $make build
  • go grab a coffee or lunch - it takes a while!
    $make binary
  • all the builds are now available in the /home/pi/moby/bundles folder

Swap pre-installed docker version for built version

  • Stop current docker
    $sudo systemctl stop docker
  • Copy over the built version over pre-installed version
    $sudo cp /home/pi/moby/bundles/latest/binary-daemon/* /usr/bin/
  • Start new version of docker
    $sudo systemctl start docker
  • Check version
$ sudo docker version
Client:
 Version:      17.06.1-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 23:02:18 2017
 OS/Arch:      linux/arm

Server:
 Version:      17.06.0-dev
 API version:  1.31 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   5fa6df34d
 Built:        Sun Aug 20 18:16:00 2017
 OS/Arch:      linux/arm
 Experimental: false


Lets test docker itself first

$ sudo docker run armhf/hello-world

Hello from Docker on armhf!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/


Test docker swarm with faas from alexellis

Start a docker swarm (single node is fine)
$ docker swarm init

Lets get alexisellis's faas code (to test docker swarm)

$git clone https://github.com/alexellis/faas
$cd faas
$./deploy_stack.armhf.sh

Find your ip address
$ifconfig

Then open up browser and hit http://:8080 to see the faas menu.

Success!

@alexellis
Copy link
Owner Author

Thanks for compiling all the instructions and comments into one 👍

@alexellis
Copy link
Owner Author

alexellis commented Aug 20, 2017

@praseodym it really doesn't work fine which is the point of these issues. Please work through the issues and you'll see what's going wrong both on ARMv6 and with Swarm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants