Beta Docker on pandora's default OS

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
As a continuation of armhf stuff, I've added some missing armhf libs and enabled various kernel options needed by Docker and it seems to work for me.

Installation
warning:
if things go wrong, you'll most likely have to reflash.

First run "Upgrade Pandora OS" from the system menu to get the latest kernel, reboot.
Then you need to install the armhf libs (you'll need roughly ~15MB of NAND space).
Code:
sudo opkg install armhf-support armhflibdevmapper1.02.1
Now you'll need to get lots of space for docker images somehow, either run the OS from SD or maybe mount /var/lib/docker as a SD (untested), I'm just abusing my lucky 1GB NAND pandora for now.

Get http://notaz.gp2x.de/misc/pnd/docker-1.10.3-pndtest.tar.bz2 and extract somewhere with unix (not FAT) fs, and follow this demo session:
Code:
$ sudo su
# cd /path/to/docker/
# ./cgroupfs-mount
# ./docker daemon &
...
INFO[0001] Daemon has completed initialization        
INFO[0001] Docker daemon                                 commit=20f81dd execdriver=native-0.2 graphdriver=aufs version=1.10.3
# ./docker run -it armv7/armhf-ubuntu_core /bin/bash
root@5e0652e5fa78:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.10 (Yakkety Yak)"
...
First it mounts cgroupfs and starts the docker daemon, then docker seems to just work (with some complaints about missing kernel features, it seems to want 3.10 but the requirement is not hard(?)), at least simple things do work. I don't really use docker much, so more advanced things might be broken still.
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Pretty much just that you avoid the trouble having to do armel build and can take any of the precompiled binaries from around the net.
 

edgex004

Advanced Member
Joined
Jan 5, 2008
Messages
1,179
Cool. I've never used Docker, but I'm interested to see what people do with this.
 

KidPaddle

Member
Joined
May 14, 2006
Messages
385
Location
Germany
The installation of armhf libs and the first start was successfull, it downloads image "armv7/armhf-ubuntu_core" from network, starting it and i got a bash shell.
Great, working. Good work.

But all images are stored on NAND (around 40mb for armv7/armhf-ubuntu_core) , so i tried to change it, but set parameter "-g" or setting env variable "DOCKER_OPTS='-g /media/TESTS/Docker/var/lib/docker/'" doesn't working. As last, i add a symbolic link "ln -s /media/TESTS/Docker/var/lib/docker /var/lib/docker", now all images stored on sd card.
But how can change it without using a symbolic link?

Thomas
 

Splintercat

Member
Joined
Oct 3, 2015
Messages
54
Location
United States
Docker has a bad habit of not picking up ENV variables.

-- edit (I should make sure I'm more careful when I read) --
You likely need to pass the options for the different mount point directly to the docker daemon when you start it.

So in the above instructions './docker daemon -g /new/location &' should work.

-- edit 2 --
I tried out lanuching './docker daemon -g /media/SD/docker' and as far as I can tell, the aufs layers from grabbing a docker container were stored in the location I specified.

'sudo du /var/lib/docker' showed me a couple of folder, each of size zero.

I'll play around with it some more.
 
Last edited:
Top