Raspberry Pi + Docker + lighttpd

Quick notes for myself on docker + lighttpd for Raspberry Pi.

1. Install docker on Raspberry Pi: http://resin.io/blog/docker-on-raspberry-pi-in-4-simple-steps/

2. Create a raspbian image for Pi:

./mkimage-debian.sh raspbian wheezy http://archive.raspbian.org/raspbian

3. Learn to use docker:


4. Run a container and attach it to a tty:

sudo docker -t -i run [docker image] /bin/bash

5. Do these things:

i. Update /etc/apt/sources.list to  “deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi”, default one is out-of-time

ii. apt-get update

iii. apt-get install lighttpd

6. Commit changes to create a new image:

e.g. sudo docker commit rpi/web

7. Run the web server and map it to host port:

e.g. sudo docker run -d -p 80:80 rpi/web /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D

8. All done.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s