Get docker running on a RaspberryPi #636

Closed
kencochrane opened this Issue May 17, 2013 · 83 comments

Projects

None yet
@kencochrane
Contributor

I'm opening this issue to help track the progress of getting Docker up and running on a RaspberryPi.

I'll update it with my progress.

If you are interested in helping, let me know here.

Collaborator
vieux commented May 17, 2013

I'm interested

Contributor

Here is a blog post that show my steps and progress so far.

http://kencochrane.net/blog/2013/05/running-docker-on-a-raspberrypi/

I have compiled a linux kernel (3.6) with LXC and aufs. I install Go, and docker, but it doesn't run since docker doesn't support ARM or 32 bit.

The post is here. https://github.com/kencochrane/kencochrane.github.com/blob/master/content/docker-raspberrypi.rst feel free to fork and make pull requests to make it better.

andyl commented May 17, 2013

Ken - do you know anyone who is working on getting docker running on a Beagle Bone Black ??

http://beagleboard.org/Products/BeagleBone%20Black

Contributor

@andyl I do not know of anyone trying to get docker running on the Beagle Bone. If I can get it up and running on the rPi, I'll move over to the BeagleBone if someone else hasn't done it yet. I'm assuming they will have the same problems, so once you solve one, hopefully the other should be fairly easy. I know they are using different ARM chips, but hopefully that isn't too bad.

Collaborator
shykes commented May 22, 2013

This tells me it's time to deal with cross-arch support.

@solomonstre
@getdocker

On Wed, May 22, 2013 at 9:50 AM, Ken Cochrane notifications@github.com
wrote:

@andyl I do not know of anyone trying to get docker running on the Beagle Bone. If I can get it up and running on the rPi, I'll move over to the BeagleBone if someone else hasn't done it yet. I'm assuming they will have the same problems, so once you solve one, hopefully the other should be fairly easy. I know they are using different ARM chips, but hopefully that isn't too bad.

Reply to this email directly or view it on GitHub:
#636 (comment)

Contributor

@shykes both will need 32bit support as well, so I'm not sure if that is something we want to deal with now.

wyuenho commented Jun 9, 2013

I'm intertest as well. I was wondering what's the fundamental reason that docker can't just recompile on and ARM system and run?

No fundamental reason. It's simply that we haven't even tried. We're keeping the surface area small to move faster, but will expand official support to more archs soon.

@solomonstre
@getdocker

On Mon, Jun 10, 2013 at 1:58 AM, Jimmy Yuen Ho Wong
notifications@github.com wrote:

I'm intertest as well. I was wondering what's the fundamental reason that docker can't just recompile on and ARM system and run?

Reply to this email directly or view it on GitHub:
#636 (comment)

Contributor
moul commented Jul 25, 2013

👍

Contributor

👍

👍 Yes please!

👍

👍

emilisto commented Sep 7, 2013

👍

THUMBS UP :D

emilisto commented Sep 7, 2013

I think Docker could have pretty awesome implications for the Raspberry Pi platform.

Currently much of software targeted for Raspberry Pi either require manual work to set up, or come bundled as entire Linux distributions — e.g. Raspbmc, IPFire, OpenELEC etc. A great step forward would be if people could run one common distribution and software makers could focus on just their thing, and then distribute them as containers.

I envision you install a common image to the SD card, and then just upload and run different images for whatever you want to use it for, e.g.

  • Router
  • Media center
  • Home control
  • Teleporter
@ghost
ghost commented Sep 10, 2013

👍

👍

👍

👍

riedel commented Sep 15, 2013

👍

mylokin commented Sep 15, 2013

👍

👍 gotta happen =)

barjo commented Sep 18, 2013

👍

Contributor

This issue has received a lot of thumbs up because of all the attention and seems to be sending a lot of notifications to everyone who's watching the repository.

Please watch this issue instead.

rho24 commented Sep 22, 2013

👍

👍

rca commented Oct 9, 2013

I'm working with a client that would love to use Docker in an ARM-based embedded environment; same chipset as the Beagle.

👍

Contributor

This should be much easier once we get 0.7 out the door. I'll spend some time looking at it once that happens, and hopefully get it over the top.

We're a small startup for whom getting docker on the Pi is very important. We have some engineering resource we can put towards this if guided on the steps needed @kencochrane. Let me know if there is any way we can help.

Contributor

@alexandrosm Here is the list i came up with. If you can help with any of them, that would be great.

  1. Get Docker to compile on the raspberry pi, and fix any compile issues due to the differences in arch.
    I think I got it to compile last time, so this might not be that hard to with the latest code.
  2. get docker to run on 32 bit. someone just posted a blog post on this. http://mwhiteley.com/linux-containers/2013/08/31/docker-on-i386.html so you could take the same steps
  3. fix this check so it allows the ability to run on rasperberryPi https://github.com/dotcloud/docker/blob/master/server.go#L1306 (see blog post in 2. for how to do)
  4. Create some base images that will run correctly on the rasperberryPi (see blog post in 2. for how to do)
  5. Create a kernel that runs with docker and all it's deps and make it available for others to use, so they don't need to compile there own. (This will be easier once 0.7 is out since it removes AUFS and will support more kernel versions)
  6. Make a downloadable image that people can burn to an SDCard so they can easily get docker up and running on the RPi.
  7. Document the development whole process, so when things change we know how to fix them.
  8. submit pull request for any Docker code changes that were needed so they get moved up stream.
  9. Document how to use Docker on the Rpi.
  10. Test everything out and make sure it works the way it should, adding unit tests were appropriate.

Thanks a lot @kencochrane. We have time planned for this on the week starting the 21st. Fingers crossed. Any particular reason you're looking to remove AUFS rather than using an rpi kernel that supports it?

Contributor

@alexandrosm I originally had to compile AUFS in by hand since it wasn't on an rpi kernels that I found that also met the other docker requirements. So I'm pretty sure I got it working, but finding a kernel that worked wasn't easy. Making that easier will be important.

In Docker 0.7 they remove the AUFS dependency and also improve the range of kernels that are supported, so finding a kernel that works with docker on rpi should be much easier.

AUFS support will be added back in, in future versions if you want it, so we can still use it if we want, but for now, I think it will be easier if we don't use it. If you know of a kernel that will work out of the box with AUFS, please let me know.

Good news, we're getting close. Have done the first 3 steps, running into a number of roadblocks around missing kernel modules, but it feels we're nearly there.

strus38 commented Nov 8, 2013

Hi
I am trying it on a RPi... here is the status I have:
$ docker images
REPOSITORY TAG ID CREATED SIZE
dietfs latest f1971bb136e4 21 minutes ago 3.5 MB (virtual 3.5 MB)

I am able to import images in docker, however, trying to run it fails miserably:
$ docker run -t -i dietfs /bin/sh
2013/11/08 18:49:43 Error: Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.io/en/latest/contributing/devenvironment for official build instructions.

$ docker version
Go version (client): devel +78cebfb89b21 Fri Nov 01 09:18:35 2013 -0700
Go version (server): devel +78cebfb89b21 Fri Nov 01 09:18:35 2013 -0700
Last stable version: 0.6.6

Any idea how I can help making this working?

Member
tianon commented Nov 8, 2013

That error can mean one of two things:

  1. docker isn't compiled correctly using ./hack/make.sh
  2. docker daemon hasn't been restarted since you compiled (which I'm guessing it was freshly started, so that shouldn't be an issue)

What I'd recommend you try, because I'm guessing you used go build manually to build, is to use instead ./hack/make.sh dynbinary. This will produce "bundles/VERSION/dynbinary/docker-VERSION" and "bundles/VERSION/dynbinary/dockerinit-VERSION". The first of these should be installed somewhere in your PATH. The second MUST be installed either next to the docker binary as "dockerinit", as "/usr/libexec/docker/dockerinit", or as "/usr/local/libexec/docker/dockerinit".

strus38 commented Nov 9, 2013

Hi,

Ok, so I tried what you explained. I have the 'bundles' did containing what you told me.
However I cannot say I have the expected results when I try the docker run command.
Here are the details:

$ docker -d &
2013/11/09 11:30:51 WARNING: You are running linux kernel version 3.6.11, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
Job #5e8e: serveapi
Loading containers: done.
2013/11/09 11:30:52 WARNING: cgroup mountpoint not found for memory
2013/11/09 11:30:52 Listening for HTTP on /var/run/docker.sock (unix)

$ docker version
Go version (client): devel +78cebfb89b21 Fri Nov 01 09:18:35 2013 -0700
2013/11/09 11:31:05 GET /v1.6/version
Go version (server): devel +78cebfb89b21 Fri Nov 01 09:18:35 2013 -0700
Last stable version: 0.6.6

$ docker images
2013/11/09 11:31:16 GET /v1.6/images/json
REPOSITORY TAG ID CREATED SIZE
dietfs latest f1971bb136e4 17 hours ago 3.5 MB (virtual 3.5 MB)

$ docker run -t -i dietfs /bin/sh
2013/11/09 11:31:24 POST /v1.6/containers/create
[error] api.go:1024 Error: Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.io/en/latest/contributing/devenvironment for official build instructions.
[error] api.go:79 HTTP Error: statusCode=500 Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.io/en/latest/contributing/devenvironment for official build instructions.
2013/11/09 11:31:24 Error: Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.io/en/latest/contributing/devenvironment for official build instructions.

$ type docker
docker is hashed (/root/docker/go//bin/docker)

$ ls -l /root/docker/go//bin/docker*
-rwxr-xr-x 1 root root 11531130 Nov 4 20:31 /root/docker/go//bin/docker
-rwxr-xr-x 1 root root 4895648 Nov 9 11:27 /root/docker/go//bin/dockerinit
-rwxr-xr-x 1 root root 4895648 Nov 9 11:27 /root/docker/go//bin/dockerinit-0.6.5-dev
-rwxr-xr-x 1 root root 6481328 Nov 9 11:27 /root/docker/go//bin/dockerinit.BAK

I have even duplicated this directory in /usr/local/libexex/docker ... just in case ...
$ ls -l /usr/local/libexec/docker/docker*
-rwxr-xr-x 1 root staff 11531130 Nov 9 11:28 /usr/local/libexec/docker/docker
-rwxr-xr-x 1 root staff 4895648 Nov 9 11:28 /usr/local/libexec/docker/dockerinit
-rwxr-xr-x 1 root staff 4895648 Nov 9 11:28 /usr/local/libexec/docker/dockerinit-0.6.5-dev
-rwxr-xr-x 1 root staff 6481328 Nov 9 11:28 /usr/local/libexec/docker/dockerinit.BAK

$ echo $PATH
/root/docker/go/src/github.com/dotcloud/docker/bundles/0.6.5-dev/dynbinary/docker-0.6.5-dev:/root/docker/go/src/github.com/dotcloud/docker/bundles/0.6.5-dev/dynbinary:/root/docker/go//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/go/bin

So, what is wrong now?
Thanks in advance.

Member
tianon commented Nov 9, 2013

It sounds to me like you've got quite the crossing of your signals there. The key point with dynbinary is that you MUST use the pair of binaries (mixing and matching different "docker" and "dockerinit" binaries will not work). Your "docker" binary must be the one that was compiled at the same time as your "dockerinit" binary. Looking at your timestamps, that's definitely not the case:

-rwxr-xr-x 1 root root 11531130 Nov 4 20:31 /root/docker/go//bin/docker
-rwxr-xr-x 1 root root 4895648 Nov 9 11:27 /root/docker/go//bin/dockerinit
strus38 commented Nov 10, 2013

Hi
You are right!
Now, I am getting this:

$ docker run -t -i dietfs /bin/sh
2013/11/10 09:16:38 POST /v1.6/containers/create
2013/11/10 09:16:44 POST /v1.6/containers/0d5f9f8c2311/attach?stderr=1&stdin=1&stdout=1&stream=1
2013/11/10 09:16:44 POST /v1.6/containers/0d5f9f8c2311/start lxc-start: failed to detect cgroup metadata
lxc-start: [error] mount.go:15 [warning]: couldn't run auplink before unmount: exec: "auplink": executable file not found in $PATH
2013/11/10 09:16:44 POST /v1.6/containers/0d5f9f8c2311/resize?h=24&w=80
[error] api.go:1024 Error: bad file descriptor
[error] api.go:79 HTTP Error: statusCode=500 bad file descriptor
[error] commands.go:2024 Error resize: Error: bad file descriptor
2013/11/10 09:16:45 GET /v1.6/containers/0d5f9f8c2311/json

So, first message 'normal' since the lxc-chechkconfig says:
--- Control groups ---
Cgroup: enabled
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled

Then the "auplink" error then comes from the missing aufs-tools ... not available directly on RPi, so I installed it manually: aufs-tools_3.0+20120411-2_armhf.deb (Wheezy version)

And then ... comes the core dump!
docker run -t -i dietfs /bin/sh
2013/11/10 09:45:43 POST /v1.6/containers/create
2013/11/10 09:45:51 POST /v1.6/containers/29e7976aebb3/attach?stderr=1&stdin=1&stdout=1&stream=1
2013/11/10 09:45:51 POST /v1.6/containers/29e7976aebb3/start
lxc-start: failed to detect cgroup metadata
lxc-start: failed to spawn '29e7976aebb35470d03868cfc165881c5fb5d83bdafdecf344a23c11792b4a71'[error] container.go:593 attach: stdout: use of closed network connection
[error] container.go:662 attach: job 3 returned error use of closed network connection, aborting all jobs
[error] mount.go:15 [warning]: couldn't run auplink before unmount: signal: segmentation fault
2013/11/10 09:45:52 POST /v1.6/containers/29e7976aebb3/resize?h=24&w=80
[error] api.go:1024 Error: bad file descriptor
[error] api.go:79 HTTP Error: statusCode=500 bad file descriptor
[error] commands.go:2024 Error resize: Error: bad file descriptor

2013/11/10 09:45:52 GET /v1.6/containers/29e7976aebb3/json

So, what do you suggest (I am getting close I think!!)
Thanks!

Member
tianon commented Nov 10, 2013

You've definitely left the realm of my expertise; glad you finally got the build working properly! Hopefully someone with more specific RaspberryPi/LXC knowledge or experience will chime in now to help. 👍

strus38 commented Nov 10, 2013

Too bad ... so if someone has a clue ... you are welcome!

rca commented Nov 10, 2013

I downloaded aufs-tools_3.0+20120411-2_armhf.deb, extracted it using dpkg-deb -x and found the binary at /sbin/auplink. Can you confirm the binary is there on the RPi as well as running it from the command line to see if you get something like this (note, this is output from a standard linux server, not on RPi):

baremetal@bm02:~$ /sbin/auplink
usage: /sbin/auplink aufs_mount_point list|cpup|flush
'list' shows the pseudo-linked inode numbers and filenames.
'cpup' copies-up all pseudo-link to the writeble branch.
'flush' calls 'cpup', and then 'mount -o remount,clean_plink=inum'
and remove the whiteouted plink.
aufs-util for aufs3.0 and later

If anyone knows how to use auplink, it'd be great to have a better way to confirm it's actually working.

Also, can you confirm that /sbin is in Docker's path to rule out Docker being unable to find the binary:

baremetal@bm02:~$ docker_pid=$(pgrep -f 'docker -d$')
baremetal@bm02:~$ sudo cat /proc/${docker_pid}/environ | sed 's/\x00/\n/g' | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
rca commented Nov 10, 2013

Noticed this on the download page I found:

"Download Page for aufs-tools_3.0+20120411-2_armhf.deb on ARM Hard Float machines"

Is the RPi an "ARM Hard Float machine"?

Hey all, to follow up on @alexandrosm's comment, the team from Resin.io have just released our full instructions to getting Docker running on the Raspberry Pi, you can find them here: http://resin.io/docker-on-raspberry-pi/

They are written from a Arch Linux system, but should be followable for other platforms. We'll be updating and verifying them by doing the full process on Mac OS X later this week.

Not sure, but different linux kernels for the RPi are either hard or soft.
The Rasbian form is hard-float and the Debian Wheezy version I use is
soft-float. Ref:
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=49970&p=388379

On 10 November 2013 21:37, Roberto Aguilar notifications@github.com wrote:

Noticed this on the download pagehttp://packages.debian.org/en/wheezy/armhf/aufs-tools/downloadI found:

"Download Page for aufs-tools_3.0+20120411-2_armhf.deb on ARM Hard Float
machines"

Is the RPi an "ARM Hard Float machine"?


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/636#issuecomment-28161528
.

rca commented Nov 11, 2013

Great job team Resin! I've been tasked with trying this out on some of our own hardware; will report back.

strus38 commented Nov 11, 2013

Hi,

Still trying to make Docker working on RPi Debian Wheezy. The guys at Resin.io did not use the Wheezy version, and I do not want to change my RPi OS.
For 'rca': the binary /sbin/auplink crashes on my RPi.

Trying to compile the aufs-util I get:

/home/pi/aufs-util-aufs3.x-rcN# make
cc -I./libau -O -Wall -DMOUNT_CMD_PATH="" ver.c -o ver
./ver
cc -I./libau -O -Wall -DMOUNT_CMD_PATH="" -c -o perror.o perror.c
perror.c:25:24: error: 'EAU_Last' undeclared here (not in a function)
perror.c:26:3: error: 'EAU_MVDOWN_OPAQUE' undeclared here (not in a function)
perror.c:26:2: error: array index in initializer not of integer type
perror.c:26:2: error: (near initialization for 'au_errlist')
perror.c:27:3: error: 'EAU_MVDOWN_WHITEOUT' undeclared here (not in a function)
perror.c:27:2: error: array index in initializer not of integer type
perror.c:27:2: error: (near initialization for 'au_errlist')
perror.c:28:3: error: 'EAU_MVDOWN_UPPER' undeclared here (not in a function)
perror.c:28:2: error: array index in initializer not of integer type
perror.c:28:2: error: (near initialization for 'au_errlist')
perror.c:29:3: error: 'EAU_MVDOWN_BOTTOM' undeclared here (not in a function)
perror.c:29:2: error: array index in initializer not of integer type
perror.c:29:2: error: (near initialization for 'au_errlist')
perror.c:30:3: error: 'EAU_MVDOWN_NOUPPER' undeclared here (not in a function)
perror.c:30:2: error: array index in initializer not of integer type
perror.c:30:2: error: (near initialization for 'au_errlist')
perror.c:31:3: error: 'EAU_MVDOWN_NOLOWERBR' undeclared here (not in a function)
perror.c:31:2: error: array index in initializer not of integer type
perror.c:31:2: error: (near initialization for 'au_errlist')
make: *** [perror.o] Error 1

Google is not very verbose on this issue... any idea?
Thanks

rca commented Nov 11, 2013

@strus38, found a post about this problem:

They are defined in linux/include/uapi/linux/aufs_type.h.
Please specify the include path by CPPFLAGS after
"make install_headers".

Any chance of some kind person hosting the resultant RPi image somewhere to
save us the trouble of reproducing this ;-)

On 10 November 2013 22:26, Alexandros Marinos notifications@github.comwrote:

Hi everyone, we've got Docker on the Pi! Thanks @kencochranehttps://github.com/kencochranefor all the help!

See full writeup here: http://resin.io/docker-on-raspberry-pi/


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/636#issuecomment-28162757
.

Hi @stevef1uk, we intend to get this done soon, though we'll probably be hosting an Arch image to begin with.

Is there any news on Docker for BeagleBone now that Docker 0.7(.2) for ARM is out ...

Arch Linux now has Docker in their ARM package repo. I suspect that means you should be able to get it going just by installing Arch then Docker via pacman. Anyone with a beaglebone care to try it out?

andyl commented Jan 10, 2014

I think this is a dumb question, but I'll ask it anyway. If I create a docker container with binary executables on an Intel cpu, it won't run on an ARM host. Is that right?

Contributor

@andyl Not by default, but cross-compiling is possible.

comzone commented Feb 16, 2014

@alexandrosm I have almost the entire collection of ARM boards. I have tested Docker on Beaglebone, Odroid-u2, Cubieboard with Archlinux and other distributions. I haven't seen it work on any of them despite it's in the software repository. It only works for me on the Raspberry Pi. And only if I follow http://resin.io/docker-on-raspberry-pi-in-4-simple-steps/ So it seems to be that the kernel modifications is still necessary.

Contributor

Latest arch kernel for beaglebone includes everything in lxc-checkconfig, so docker works as expected (on btrfs storage). Doesn't work on arch for wandboard, as that is missing half of required cgroups stuff.

Overall, embedded systems tend to use older kernels with specific configs.

It shouldn't be that hard to recompile the kernel with required cgroups/namespaces support anyway 😉

Contributor
djmaze commented Feb 17, 2014

The arch kernel config for Odroid was adjusted a few weeks ago. It works well on Odroid-u3, using btrfs storage.

Was having problems with devicemapper, but I didn't test if they have been fixed in the meantime (#3280).

Contributor

Aside from @archlinuxarm already building it with some sed magic, I have opened this PR.
#5341

@tianon tianon referenced this issue May 7, 2014
Closed

It's broekn #5645

ddurdle commented May 10, 2014

I have the latest beagle bone black kernel, and despite the comments here, it doesn't contain everything necessary for lxc..
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: missing
Network namespace: enabled
Multiple /dev/pts instances: missing

--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: missing
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: missing

--- Misc ---
Veth pair device: missing
Macvlan: missing
Vlan: enabled
File capabilities: enabled

Contributor

The "latest beagle bone black kernel" for which distribution?

ddurdle commented May 10, 2014

The Angstrom and Debian.

Contributor

In those cases, you'll need to contact their maintainers, or recompile your kernel with the necessary features.

I am a core developer with @archlinuxarm and can say for a fact, we do support it.

ddurdle commented May 10, 2014

Thanks for the info, I will give the latest Arch a try. Does the ARM6 version for the Raspberry Pi also contain kernel LXC support?

Contributor

Yup. resin.io is even based on Arch.

cswank commented May 12, 2014

Hi @WarheadsSE, I just installed arch on a beaglebone black and have docker running. Don't I need access to a BBB base docker image in order to try it out? Do you know how I can get my hands on one?

Contributor

You really just need an armv7h userland container, not necessarily anything specifically for the BBB. This can be done with the docker import command. (http://docs.docker.io/reference/commandline/cli/#import)

Use the armv7-latest tarball from http://archlinuxarm.org/developers/downloads

cswank commented May 12, 2014

Nice, thanks.

cswank commented May 12, 2014

@WarheadsSE: am I missing something? It doesn't work for me::
[root@alarm tmp]# docker import http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz archbase
Downloading from http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz
b292df94485143e8417f827a8d89c80f17504d0fa34e051e388484d010b04515
[root@alarm tmp]# ===========================================>] 179.4 MB/179.4 MB
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
archbase latest b292df944851 3 minutes ago 378.1 MB
[root@alarm tmp]# docker run -i -t archbase /bin/bash
2014/05/12 16:59:05 Error: Cannot start container 6f0ce084b89d2664f60f251a85285148695127989c0fcb882f65480dbe52aa78: mountpoint not found

Contributor

This conversation needs moved out this issue, and to the @archlinuxarm forums.

Contributor

Having Docker run on ARM devices is a planned feature, but keeping this issue open isn't necessary.
The major problem isn't making the needed changes to Docker, it's the registry side and the tooling behind supporting that as another platform on the registries.

I'll close this issue now since it's not an immediately actionable issue. However, this doesn't mean that this isn't going to be implemented any more. Please feel free to continue to discuss here.

It should be possible to run Docker on ARM devices and on other platforms at some point after 1.0 with full index support, but not right now.

@unclejack unclejack closed this May 30, 2014

I understand. Standing on the shoulders of the Resin folk and others:

https://byteoutalife.wordpress.com/2013/12/30/building-docker-from-source-on-the-raspberry-pi/
http://raspberrypicloud.wordpress.com/2013/03/12/creating-an-lxc-container-on-the-raspberry-pi/
http://kencochrane.net/blog/2013/05/running-docker-on-a-raspberrypi/

I have put up the Raspbian kernel I created to run docker plus a port of the 0.11 version of docker, which works for me on Github:

https://github.com/stevef1uk/docker_for_rpi

Apologies for the very brief instructions, but I am back at work now and time poor again.

before running docker I need arch linux but:

@WarheadsSE do you know how to install archlinux on the raspberry pi from a mac? I cannot find the .img files anymore on http://archlinuxarm.org/ and the instructions on http://archlinuxarm.org/platforms/armv6/raspberry-pi are not achievable on mac ?

@alexandrosm spoke about hosting an arch image ? can you tell me more ?

Contributor

@vallettea This is not the place for this discussion. LiveUSB/CD or VM works fine.

@vallettea were you able to find a arch linux .img? I'm having the same problem.

@mikeholczer no haven't found it. However you might be interested in this
http://blog.hypriot.com/kick-ass-raspberry-pi-2-having-a-forbidden-love-affair-with-docker-1-dot-4-1
havn't tested it but interested if you have time.

Contributor
moul commented Feb 26, 2015

Hi,

I built an armhf ready arch linux image: https://registry.hub.docker.com/u/armbuild/archlinux-disk/ using this Dockerfile: https://github.com/armbuild/docker-brew-fedora/tree/20-v2

It is not enhanced for Docker and the image is still huge, but you can run it and create images depending on it too, as I did for this image: https://github.com/online-labs/image-archlinux/blob/master/Dockerfile

Hope it can help

PS: I also created a v21 branch, It builds, but I didn't test: https://github.com/armbuild/docker-brew-fedora/tree/21

Contributor

@mikeholczer Arch Linux ARM no longer distributes .img files. The instructions for installing work perfectly well with a VM. This is also not the place for this discussion.

@vallettea This is a solution I have used:

  • Step1 Install docker.io with apt-get
apt-get install docker.io

the docker version is 1.3.3

  • Step2 Create base image with the ArchLinux, the command is:
pi@rpi ~/notebooks $ wget http://212.187.212.74/bt/ab301ea7ea245c12ea9babf5235d75b04890bbd4/data/ArchLinuxARM-2014.10-rpi-rootfs.tar.gz
--2015-12-30 17:02:23--  http://212.187.212.74/bt/ab301ea7ea245c12ea9babf5235d75b04890bbd4/data/ArchLinuxARM-2014.10-rpi-rootfs.tar.gz
Connecting to 212.187.212.74:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 220637379 (210M) [application/x-gzip]
Saving to: `ArchLinuxARM-2014.10-rpi-rootfs.tar.gz'

74% [================================================================================>                             ] 163,600,832 --.-K/s   in 55m 51s

2015-12-30 17:58:15 (47.7 KB/s) - Read error at byte 163600832/220637379 (Connection timed out). Retrying.

--2015-12-30 17:58:16--  (try: 2)  http://212.187.212.74/bt/ab301ea7ea245c12ea9babf5235d75b04890bbd4/data/ArchLinuxARM-2014.10-rpi-rootfs.tar.gz
Connecting to 212.187.212.74:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 220637379 (210M), 57036547 (54M) remaining [application/x-gzip]
Saving to: `ArchLinuxARM-2014.10-rpi-rootfs.tar.gz'

100%[+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++============================>] 220,637,379  837K/s   in 79s

2015-12-30 17:59:36 (703 KB/s) - `ArchLinuxARM-2014.10-rpi-rootfs.tar.gz' saved [220637379/220637379]

pi@rpi ~/notebooks $
  • Step3 Import the base image with car and docker import, after that you can use the image:
pi@rpi ~/notebooks $ cat ArchLinuxARM-2014.10-rpi-rootfs.tar.gz |sudo  docker import - archlinux
46b927e18f3bb69337c58ae1e195f34eea7b17d0c71ef5dad63d6cbce102f844
pi@rpi ~/notebooks $ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
archlinux           latest              46b927e18f3b        5 minutes ago       445.6 MB
raring              latest              e0168fc30ed0        About an hour ago   0 B
alpine              3.3.0               0a0aa665bfa2        2 hours ago         85.02 MB
ubuntu              14.04               723d8ba23c53        4 hours ago         204.8 MB
pi@rpi ~/notebooks $ sudo docker run -ti archlinux /bin/bash
[root@d7e0d53e291c /]# ls
bin  boot  dev  etc  home  lib  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[root@d7e0d53e291c /]#

My Raspberry PI installed raspbian, the version:

pi@rpi ~ $ uname -a
Linux rpi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
pi@rpi ~ $ 

Docker version and info:

pi@rpi ~ $ sudo docker --version
Docker version 1.3.3, build d344625
pi@rpi ~ $ sudo docker info
Containers: 0
Images: 5
Storage Driver: devicemapper
 Pool Name: docker-179:2-73614-pool
 Pool Blocksize: 65.54 kB
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 1.203 GB
 Data Space Total: 107.4 GB
 Metadata Space Used: 1.286 MB
 Metadata Space Total: 2.147 GB
 Library Version: 1.02.90 (2014-09-01)
Execution Driver: native-0.2
Kernel Version: 4.1.13-v7+
Operating System: Raspbian GNU/Linux 8 (jessie)
WARNING: No swap limit support
pi@rpi ~ $ 
rca commented Dec 31, 2015

Latest and greatest Docker for RPi here: http://blog.hypriot.com/

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