Skip to main content
corrected, architecture of Snappy, adjusted expected output of Sqlite3
Source Link
user29019
user29019

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intelsia32 either and definitely not Snappy for the Pi. If instead you wanted to get Docker going on the Pi2 using Arch hereshere's a guide on what I did.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using docker import then create a dockerfileDockerfile to make it 'do stuff'.

docker run --name toby8 -t -i arch:sqlite3

[toby@archpi sqlite]$ docker run --name toby8 -t -i arch:sqlite3

and Sqlite3 should greet you with

SQLite version 3.8.9 2015-04-08 12:16:33
Enter ".help" for usage hints.
sqlite>

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intels either and definitely not Snappy. If instead you wanted to get Docker going on the Pi2 using Arch heres a guide on what I did.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using docker import then create a dockerfile to make it 'do stuff'.

docker run --name toby8 -t -i arch:sqlite3

[toby@archpi sqlite]$ docker run --name toby8 -t -i arch:sqlite3
SQLite version 3.8.9 2015-04-08 12:16:33
Enter ".help" for usage hints.
sqlite>

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for ia32 either and definitely not Snappy for the Pi. If instead you wanted to get Docker going on the Pi2 using Arch here's a guide on what I did.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using docker import then create a Dockerfile to make it 'do stuff'.

docker run --name toby8 -t -i arch:sqlite3

and Sqlite3 should greet you with

SQLite version 3.8.9 2015-04-08 12:16:33
Enter ".help" for usage hints.
sqlite>
cleared up why i added a guide, the OP didn't ask for one.
Source Link
user29019
user29019

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intels either and definitely not Snappy. If instead you wanted to get Docker going on the Pi2 using Arch heres a guide on what I did.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using [docker import][1]docker import then create a dockerfile to make it 'do stuff'.

The below is very much 'what-if?' the image is about 1GB (!) but hopefully gets you going, can fix the image later. thisThis assumes you are root and you've updated arch with

# install docker and lxc
pacman -S docker lxc wget
# download the arch image
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
# build a base image from it
cat ArchLinuxARM-rpi-2-latest.tar.gz | docker import - archarm:test2

you should see, in the list,

and there is Arch on the Pi2 running a container from Docker 1.5 :)

For a slightly less trivial example if you create a Dockerfile (this is case sensitive) in a directory and add

#use base image
FROM archarm:test2

#update to get the rightcurrent urlsrepos
RUN pacman -Syy

#fetch sqlite
RUN pacman -S sqlite3 --noconfirm

ENTRYPOINT sqlite3 testdb

HopeThen its over to you to build your containers by hand :(, hope that helps though.

And yes, Ubuntu Snappy on the Pi2 seems a bit pointless out-of-the-box [1]: http://docs.docker.com/reference/commandline/cli/#import since there are no frameworks available and nothing does anything, except maybe that Go server?

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intels either.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using [docker import][1] then create a dockerfile to make it 'do stuff'.

The below is very much 'what-if?' the image is about 1GB but hopefully gets you going. this assumes you are root and you've updated arch with

# install docker and lxc
pacman -S docker lxc
# download the arch image
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
# build a base image from it
cat ArchLinuxARM-rpi-2-latest.tar.gz | docker import - archarm:test2

you should see

and there is Arch on the Pi2 running a container :)

For a slightly less trivial example if you create a Dockerfile in a directory and add

#use base image
FROM archarm:test2

#update to get the right urls
RUN pacman -Syy

#fetch sqlite
RUN pacman -S sqlite3 --noconfirm

ENTRYPOINT sqlite3 testdb

Hope that helps.

And yes, Ubuntu Snappy on the Pi2 seems a bit pointless out-of-the-box [1]: http://docs.docker.com/reference/commandline/cli/#import

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intels either and definitely not Snappy. If instead you wanted to get Docker going on the Pi2 using Arch heres a guide on what I did.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using docker import then create a dockerfile to make it 'do stuff'.

The below is very much 'what-if?' the image is about 1GB (!) but hopefully gets you going, can fix the image later. This assumes you are root and you've updated arch with

# install docker and lxc
pacman -S docker lxc wget
# download the arch image
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
# build a base image from it
cat ArchLinuxARM-rpi-2-latest.tar.gz | docker import - archarm:test2

you should see, in the list,

and there is Arch on the Pi2 running a container from Docker 1.5 :)

For a slightly less trivial example if you create a Dockerfile (this is case sensitive) in a directory and add

#use base image
FROM archarm:test2

#update to get the current repos
RUN pacman -Syy

#fetch sqlite
RUN pacman -S sqlite3 --noconfirm

ENTRYPOINT sqlite3 testdb

Then its over to you to build your containers by hand :(, hope that helps though.

And yes, Ubuntu Snappy on the Pi2 seems a bit pointless out-of-the-box since there are no frameworks available and nothing does anything, except maybe that Go server?

Source Link
user29019
user29019

If you try the Arch Linux image you can get docker going, as smokes2345 says you cant use much in the docker repo but you can create your own stuff and it'll run. Docker was at 1.5 at the time of writing so its quite up-to-date too.

As I understand the Docker hub/repo is x86_64 only at the moment, and doesn't work too well for 32 bit Intels either.

Whilst its a bit uphill you can build a base image from the Arch Raspberry pi tar file using [docker import][1] then create a dockerfile to make it 'do stuff'.

I've had it running sqlite3 and python3 in a container, admittedly that's pretty lame but it does work.

The below is very much 'what-if?' the image is about 1GB but hopefully gets you going. this assumes you are root and you've updated arch with

pacman -Syy
pacman -Su

Anyway, to build my base image I did

# install docker and lxc
pacman -S docker lxc
# download the arch image
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
# build a base image from it
cat ArchLinuxARM-rpi-2-latest.tar.gz | docker import - archarm:test2

it takes a minute or two but you should then see something like

14959a4d75379ec943f6303a59109aebe1763971586812cd074f652c466cf16d

and if you type

docker images

you should see

archarm             test2               14959a4d7537        6 minutes ago   

with the start of that long ID - yours will be different.

you should then be able to run this image as a container using

docker run -t -i --name toby archarm:test2 /bin/bash

and there is Arch on the Pi2 running a container :)

For a slightly less trivial example if you create a Dockerfile in a directory and add

#use base image
FROM archarm:test2

#update to get the right urls
RUN pacman -Syy

#fetch sqlite
RUN pacman -S sqlite3 --noconfirm

ENTRYPOINT sqlite3 testdb

then build this using

docker build --tag arch:sqlite3 .

you should be able to start a container directly into Sqlite3

docker run --name toby8 -t -i arch:sqlite3

[toby@archpi sqlite]$ docker run --name toby8 -t -i arch:sqlite3
SQLite version 3.8.9 2015-04-08 12:16:33
Enter ".help" for usage hints.
sqlite>

Hope that helps.

And yes, Ubuntu Snappy on the Pi2 seems a bit pointless out-of-the-box [1]: http://docs.docker.com/reference/commandline/cli/#import