7 ms·
Docker on Raspberry Pi
- overdrev 13y agoNice.
- alexandros 13y agoHappy to have this out there. We worked quite hard on this the past few weeks, hopefully it will help people see the benefit of Docker for the embedded world as they have seen it on the server side.
- rolleiflex 13y agoVery nice. Even if just for marketing I think this is going to pay for itself. Many people have Raspberry Pi's lying around, semi-useless. Working on this gives me a nice a weekend-night project I can try without fear of borking something critical on my other devices, plus a new thing to play with is always welcome.
- fredrikcarno 13y agoReally nice work, im preparing to roll out a audio application for the pi and this could be very usefull
- doelie_ 13y agoLink?
- csense 13y agoIf their focus is on the Internet of Things and hardware applications enabled by the Pi, their next focus should be creating or linking to documentation about how to expose hardware interfaces like the Pi's GPIO to guests. Of course a higher priority should be cleaning up the process in this article, making the install simpler, getting precompiled kernels/images out there, getting it to work with Raspbian host.
- alexandros 13y agoThanks for the feedback. Hopefully the instructions in the article will be helpful to the docker team first and foremost, and adventurous hackers possibly. The hope is that this will become part of official docker, not that people will have to repeat a 100+ step process. As a side note, getting this working on Raspbian should be feasible (consider it an exercise for the reader), we just used Arch as we've focused on that for a bunch of other things.
- FooBarWidget 13y agoDocker awesome. Anybody who wants to play around it with can do so easily with the Docker-friendly Vagrant boxes that I've built. http://blog.phusion.nl/2013/11/08/docker-friendly-vagrant-boxes/ http://blog.phusion.nl/2013/11/08/docker-friendly-vagrant-bo... It used to be a minor pain to provision to Vagrant of the system reboot required to replace the kernel, but these boxes have already done that part for you. Docker still has some bugs though. I hope they'll fix them quickly.
- TheMakeA 13y agoI'm looking for "the CoreOS of Raspberry Pi." Just a barebones Linux distro that just runs Docker images. Anyone have any ideas?
- matthewmacleod 13y agoI haven't seen anything yet, but I'm very interested in this area – I've got an application that uses a bunch of RasPi nodes, and running anything like Raspbian or even PiLFS feels too heavyweight for what I ultimately want (a single networked app that runs on startup).
- alexandros 13y agoHi Matthew, I'm interested in how you're dealing with code deployment. Have an email address in profile if you want to talk.
- alexandros 13y agoIf anyone gets that done it will make us very happy! We run our servers on CoreOS, putting it on the devices as well would be awesome. AFAICT it's about getting etcd to run on the Pi, as well as any other small projects that make up CoreOS.
- shykes 13y agoThere is an ongoing project to bundle Docker with Tiny core linux, which is even more lightweight than coreos. Meanwhile there is also work to add clustering capabilities to docker.
- alexandros 13y agoAwesome stuff.. any pointers to where this work is getting done?
- shykes 13y agoMost of the action is on the #docker irc channel on Freenode.
- consonants 13y agoThis will make things easy to use docker on my Exynos board, last time I tried it there was no ARM compatibility.
- singular 13y agoAwakening from a nap to see something you worked on #1 on hacker news is quite nice :-) hope people get a kick out of this!
- vertis 13y agoLooks like I know what I'll be doing with my evening.
- cvlc 13y agoI, too, had the idea of utilizing Docker in the IoT - in fact, I chose that as the focus of my MSc dissertation (though my primary goal was to implement automated docker/LXC container provisioning for resources on a server to be utilized by a sensor device). I created a little open-source tool called Orchestrator (https://github.com/cvlc/orchestrator https://github.com/cvlc/orchestrator) to automatically provision docker instances on a remote server in response to DHCPv6 requests. Unfortunately, I've been side-tracked on other projects for a while and haven't really got the ball rolling yet - I'll be looking to update it fairly soon, though! Jérôme Petazzoni (employee of Docker, formerly dotcloud) has created an excellent (I'd say essential) tool for dealing with networks under Docker called Pipework (https://github.com/jpetazzo/pipework https://github.com/jpetazzo/pipework) which is definitely worth a look if you're looking to network containers together.
- Zuph 13y agoI come from an Electrical Engineering/Low-level embedded background. I only just learned of Docker/Vagrant/et al., and although I can understand the utility in some contexts, I can't possibly understand the utility of running Docker on a Raspberry Pi (except as a toy exercise). What am I missing?
- dstaley 13y agoCorrect me if I'm wrong, but couldn't you just make an image of the SD card and distribute that, as opposed to having people go through 88 (I counted) steps?
- stock_toaster 13y agoNot to mention, compiling a custom patched kernel.
- fragmede 13y agoAnd they're not trivial steps either. Install Arch Linux? Resize the root partition? Patch and build the kernel? Bootstrap and rebuild Docker? I'm all for an easier Internet of things, but this ain't it (yet).
- petrosagg 13y agoYou're right, the instructions are a lot and not trivial but are very useful for the Docker team and hackers that may want to modify the procedure. We are planning to release pre-built binaries and kernel soon though.
- yebyen 13y agoIf you want to maintain the idea that RPI is for hobbyists, you should not make it too easy, since these are all things that normal hobbyists used to do, until it became unnecessary. If nothing else, make sure there is still a dockerfile (for parts where direct access to hardware are not needed, like you would never write a dockerfile that resized the OS partition since that happens outside) and always current up-to-date manual instructions! Thanks for the great work! I am looking forward to CoreOS on RPI, if that's planned to be a thing! It would be a good reason to buy a bigger SD card, for me.
- deleted 13y ago[deleted]
- Lifescape 13y agoIf anyone is on a Mac trying to write the Arch image to an SD card, follow the steps on this site to find your SD card: http://www.embeddedarm.com/support/faqs.php?item=10 http://www.embeddedarm.com/support/faqs.php?item=10 The command for me was: sudo dd if=$RPIDIR/archlinux-hf-2013-07-22.img of=/dev/disk1 bs=4m It also took about 20 minutes to write.
- nwh 13y agoFor the love of everything fluffy, don't run that command if you don't know what you're doing!
- vinceguidry 13y agoIf you don't know what dd does, never run it. You really should know what all commands do, but dd can hose your system very easily.
- miksago 13y agoYeah, I'm working on updated instructions at the moment. You may get stuck at the step that's "Install a new kernel on the RPi." if your system is i386; Those instructions only work on x86_64, afaik. I'm keeping a log of what I try to see if I can make things faster / better.
- Lifescape 13y agoYep, got stuck on that step :P Decided to go with an Arch Vagrant box (Specifically Arch Linux x86_64 (2013-08) from http://www.vagrantbox.es/ http://www.vagrantbox.es/). Running into issues with make in Step 5: drivers/thermal/bcm2835-thermal.c:21:23: fatal error: mach/vcio.h: No such file or directory Has anyone here run into this issue?
- miksago 13y agoI've just tried to install crosstool-ng on Mac OS X 10.6.8 (i386), and building it just never works.
- atmosx 13y agoA couple of naive questions: Isn't more expensive to run docker upon Linux and deploy your applications instead of installing the applications and it's dependencies directly on the Pi? How is this going to work on underpowered machines such as the RPi? Is it for applications that require a very small amount of memory? (say you can run 5 applications that consume 80 MB each?). Maybe I erroneously tie-up Docker with web-development and web-based applications, but can you give an couple of example applications that could benefit from docker on the Pi? thanks
- CSDude 13y agoDocker, actually Linux containers uses cgroup, which only isolates and priorities the resource usages, the overhead is very very low, so it does not matter much where it is used. The point of docker is allowing you to deploy your images, or more adequately put Dockerfiles on anywhere. So, when you have a Rpi cluster, you would worry less about deployment.
- alexandros 13y agoThanks for the excellent questions. I started writing a response but it became way too long, so I moved it to the blog: http://resin.io/blog/why-port-docker-to-the-raspberry-pi/ http://resin.io/blog/why-port-docker-to-the-raspberry-pi/
- atmosx 13y agoThank you alexandros for the prompt reply. I will read the blog post tonight at home. ps. You're Greek?
- alexandros 13y agoYup :) The team is split between the UK and Athens.
- slaxman 13y agoThis is brilliant. This means writing software that interfaces with real world physical items is going to get much simpler, quicker and more efficient. Awesome work.