Skip to content

Conversation

@StefanScherer
Copy link
Contributor

- What I did

Compile the Docker Engine 1.11 and build a deb package for Raspbian that is working for all eight million Raspberry Pi's, beginning with RPi 1, RPi 2, RPi 3 and should also work with RPi zero.

- How I did it

Take the contrib/builder/armhf/debian-jessie/Dockerfile for ARMv7 and use a Raspbian Docker image and set GOARM to 6 instead of 7 to build ARMv6 compatible binaries.

- How to verify it

Run make deb on an ARM machine, this can be ARMv6 or ARMv7. This build works eg. on Scaleway C1 servers.

Install it on a Raspbian LITE image:

$ echo "overlay" | sudo tee -a /etc/modules
$ sudo modprobe overlay
$ sudo apt-get install -y libapparmor1
$ sudo raspi-config
# reboot required for resizing SD card
$ sudo dpkg -i docker-engine_1.11*jessie_armhf.deb

Install it on HypriotOS for Raspberry Pi:

$ sudo apt-get remove -y docker-hypriot
$ sudo dpkg -i docker-engine_1.11*jessie_armhf.deb

- A picture of a cute animal (not mandatory but encouraged)

Successful installation on a Raspberry Pi (1) Model B with Raspbian LITE SD card image from the Raspberry Pi Foundation.

bildschirmfoto 2016-04-09 um 00 25 22

Would be great if we can add this Dockerfile to the 1.11 release so we can get rid of our proprietary build steps and start using docker-engine package instead of docker-hypriot package :-)

Signed-off-by: Stefan Scherer [email protected]

@StefanScherer
Copy link
Contributor Author

This PR depends on the fix #21819 to build the deb packages.

@Govinda-Fichtner
Copy link
Contributor

@StefanScherer 👯

@thaJeztah
Copy link
Member

Would be great if we can add this Dockerfile to the 1.11 release so we can get rid of our proprietary build steps and start using docker-engine package instead of docker-hypriot package :-)

@StefanScherer you want us to also ship the .deb through apt.dockerproject.org for 1.11 ?

@StefanScherer
Copy link
Contributor Author

@thaJeztah I have seen that the contrib/builder/deb structure has made it into 1.11 so I thought of adding the Dockerfile. So everyone can build the Docker Engine for the RPi on an ARM device without any patches

$ git clone https://github.com/docker/docker
$ cd docker
$ make deb

Adding the deb to apt.dockerproject.org would be fantastic, but to be realistic I think this is too close to the 1.11 release. But for the long term this would help, eg. improving docker-machine binary to support "raspbian" beside the "debian" distro to also just download the ARM package from there.

@thaJeztah
Copy link
Member

@StefanScherer thanks; I have no real objection against adding the Dockerfile, but let me check if that would also automatically result in it being build during the release process. I'm indeed not comfortable with shipping binaries / debs for 1.11 this soon before the release, but adding a Dockerfile so that people can build it themselves sounds ok with me

@DieterReuter
Copy link
Contributor

@StefanScherer 👏
@thaJeztah with this step we really can "build - ship - run" even the Docker engine the Docker way. Then everybody can build the Docker engine for ARMv6 and ARMv7 and could install and run it on a large variety of ARM devices - no matter the installed OS (Raspbian, Armbian, HypriotOS, ...). And in the long run it would be fantastic to get it built and shipped through the Docker release process.

@thaJeztah
Copy link
Member

@tiborvass I'll add this to the 1.11 milestone; but only if we can include this without it being automatically resulting in debs to be published on apt.dockerproject.org

@thaJeztah thaJeztah added this to the 1.11.0 milestone Apr 11, 2016
@icecrime
Copy link
Contributor

@tiborvass I'll add this to the 1.11 milestone; but only if we can include this without it being automatically resulting in debs to be published on apt.dockerproject.org

I read this as "let's include it only if it makes no difference", so if you don't mind we'll just not include it and save us a cherry-pick ;-)

@icecrime icecrime removed this from the 1.11.0 milestone Apr 11, 2016
@thaJeztah
Copy link
Member

ping @tiborvass @tianon @kencochrane PTAL!

@kencochrane
Copy link
Contributor

LGTM

@tiborvass
Copy link
Contributor

I am not sure what level of "official" release we want to give raspbian. Not that I'm against it, I just want to understand what this entails. /cc @icecrime

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be using an official image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but we probably need an ARMv6 compatible base image here. The armhf/debian:jessie is for ARMv7. I'm not sure if the ENV GOARM 6 below is enough to have proper docker engine binaries for ARMv6.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No there is no guarantee that it will work correctly, eg we link to some C libraries that might have some uses of non compatible instructions in them. I think we would need an official raspbian image.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not armel/debian:jessie?
That one works with GOARM 6...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luxas Thanks for the pointer. I haven't noticed these Docker images. I'll try that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those should be used with GOARM 5 I think but that is one option.

In contrib/builder/deb/armhf/raspbian-jessie/Dockerfile
#21895 (comment):

@@ -0,0 +1,11 @@
+FROM resin/rpi-raspbian:jessie

Why not armel/debian:jessie?
That one works with GOARM 6...


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/21895/files/fa10270f1fd14958c3a95adc99131408cd700226#r63225616

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build of the resin/rpi-raspbian Docker images is quite clean, small and well documented in this repo https://github.com/resin-io-library/resin-rpi-raspbian. I'd like to suggest to use these ones. The builds can be run on an Intel build server and therefore could be used for official images, too.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+100 for an official raspbian image.

@icecrime
Copy link
Contributor

LGTM

@thaJeztah
Copy link
Member

ping @tiborvass you wanted to have an official image; are you ok with moving this forward, or rather not?

@StefanScherer
Copy link
Contributor Author

I've tested a build with FROM armel/debian:jessie, but then we have problems with the prebuilt Go tar.gz ( https://jenkins.hypriot.com/job/armhf-docker/1/console ).

Instead of investigating further how to make this work with armel, an official raspbian base image would help more people. @firecyberice has done this for us internally some time ago and we could help build such an official image.

Using the resin base image still works building eg. docker 1.11.1 ( see artifacts at https://jenkins.hypriot.com/job/armhf-docker/2/ )

@thaJeztah
Copy link
Member

ping @tianon wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now needs updating in line with arm/jessie f32ccb0#diff-0eafa589a244859aba06e5c8a1b522fc

@dmp42
Copy link
Contributor

dmp42 commented May 27, 2016

Just checked with @justincormack about this - very exciting!!!

Not going with armel is fine

In addition to @justincormack comments (about golang): @tianon what is the process for resin/rpi-raspbian to become an official image?

Would love to see this merged ASAP :)

Signed-off-by: Stefan Scherer <[email protected]>
Signed-off-by: Stefan Scherer <[email protected]>
@StefanScherer StefanScherer force-pushed the add-raspbian-jessie-deb branch from fa10270 to d59458c Compare May 27, 2016 21:00
@justincormack
Copy link
Contributor

Have scheduled an arm build. I would be happy to see this merged without an official raspbian image in the short term, but I do think it would be great to have an official raspbian image, and it should be pretty straightforward as it is basically the same as jessie/arm.

@justincormack
Copy link
Contributor

LGTM if the arm build passes.

@justincormack
Copy link
Contributor

The arm build has passed, looks good.

@thaJeztah
Copy link
Member

I'm gonna LGTM this; Having official builds for rPi is a great thing to have; we may want to add some information somewhere to what extend we consider it "officially supported", and/or mention it's still early, so "here may be some dragons"

@thaJeztah thaJeztah merged commit 02caa73 into moby:master May 28, 2016
@StefanScherer StefanScherer deleted the add-raspbian-jessie-deb branch May 28, 2016 11:35
@DieterReuter
Copy link
Contributor

🚀 Cool, now the next milestone on the way to an official ARM support is reached!

@Govinda-Fichtner
Copy link
Contributor

Very cool! This will be an awesome 📦 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.