1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Beta Docker on pandora's default OS

Discussion in 'Pandora OS (SuperZaxxon GNU/Linux)' started by notaz, Dec 23, 2016.

  1. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,836
    Location:
    Lithuania
    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.
     
    Tags:
    _jr_, Magic Sam and Linux-SWAT like this.
  2. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,613
    Nice !
    How is docker related to armhf ?
     
  3. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,836
    Location:
    Lithuania
    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.
     
    _jr_ likes this.
  4. edgex004

    edgex004 Advanced Member

    Joined:
    Jan 5, 2008
    Messages:
    1,085
    Cool. I've never used Docker, but I'm interested to see what people do with this.
     
  5. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,613
    It may also be a bridge between Pyra/Pandora compatible packages.
     
  6. KidPaddle

    KidPaddle Still Fresh

    Joined:
    May 3, 2009
    Messages:
    39
    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
     
  7. Splintercat

    Splintercat Still Fresh

    Joined:
    Oct 3, 2015
    Messages:
    23
    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: Feb 17, 2017

Share This Page

Loading...