Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Building ARM Docker Images on the Raspberry Pi [Snippets]

DZone's Guide to

Building ARM Docker Images on the Raspberry Pi [Snippets]

This quick, easy guide will help you build ARM Docker images on your Raspberry Pi. It's a matter of some Shell commands and some Dockerfile configuration.

· IoT Zone ·
Free Resource

Once you've got the right tools, building ARM Docker images is a snap. It's a relatively painless process, so let's dive in.

Install Docker for ARM using the install script:

curl -sSL https://get.docker.com | sh


From: https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/

Set to startup as a service:

sudo systemctl enable docker


Start the service manually now (or reboot to start automatically):

sudo systemctl start docker

Add the user to the Docker group (to run the Docker CLI without sudo):

sudo usermod -aG docker pi

To create a new image from a Raspbian base for ARM, use the Raspbian images from Resin (in your Dockerfile):

FROM resin/rpi-raspbian:latest


From: http://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/

Edit your Dockerfile to include and configure whatever you need, and build an image as normal on the Pi using:

docker build -t tagname .


… and off you go!

Topics:
iot ,docker images ,arm ,raspberry pi

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}