Docker baseimage for armbian

Sergio Inacio

1 1

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?


In the Armbian build environment there is a Dockerfile. It is in the lib directory. This can be used to build your Armbian docker container.


FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y git build-essential binutils
RUN git clone
RUN cp lib/ .



Start it with ( don’t forget the point )

docker build -t armbian_dev .


It will create a image named armbian_dev. The name can be of your choise.  
you can see this image with this command:

docker images


Run a container with this image:


docker run -t -i armbian_dev


You can find the lib directory in /root in the container.


If you want a more clever solution (like no storage limits with the container) with the building environment outside the container you should do something like this:


docker run -v /bigdisk/DOCKER/ARMBIAN:/mnt/DEVELOP -t -i armbian_dev


bigdisk/DOCKER/ARMBIAN sloud be your local disk. /mnt/DEVELOP will be made in the container.


In this example docker container you only can build kernels, no complete file systems. This is more compilcated.

I run docker in a Centos 6 enviroment.


First time you use this container it will have to download toolchains, sources, etc. You maybe have to hit enter somewhere in this process. If you need to edit files in the container don't forget to install vim or nano in the container.

apt-get install vim
apt-get install nano


Link to post
Share on other sites

Ok. So I answered a not asked question. Well it was a nice roundup for myself to.


Maybe you could point out what your question is?


- Do you want to use Docker on an Arm based board?

- Do you want something else?


I think you can find  information on this forum about Arm and Docker.

See this post:


Link to post
Share on other sites

Still don't know what Sergio is asking. Could it be that he would like to run Docker on his bpi (Banana Pi)?

Should be because it is not building Armbian with the use of a docker image.


So lets give it a try and answer that question.


You need a decent image to start with. Should be one with the mainline kernel. So download it form the download page:


Or build it yourself. And yes, you could use docker for the Armbian build enviroment.


Then install docker:


curl -sSL | sh


That's all. Docker gets installed:


+ sh -c apt-get update
Hit:1 xenial InRelease
Get:2 sid InRelease [255 kB]
Hit:3 xenial InRelease
+ sh -c docker version
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:26:33 2017
 OS/Arch:      linux/arm

 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:20:51 2017
 OS/Arch:      linux/arm
 Experimental: false

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to
         for more information.


Just to get network, etc alright I rebooted. There now will be a docker interface docker0


docker0   Link encap:Ethernet  HWaddr 02:42:0f:2d:33:93
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::42:fff:fe2d:3393/64 Scope:Link
          RX packets:10097 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17940 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:559538 (559.5 KB)  TX bytes:27093441 (27.0 MB)


You can now run docker, f.i. by downloading a arm ubuntu image:


docker pull arm32v7/ubuntu


You can now start a container:


docker run -dit arm32v7/ubuntu


See the running container.


root@macippi:~# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
05b38d77cee3        arm32v7/ubuntu      "/bin/bash"         12 minutes ago      Up 12 minutes                           dreamy_lewin

Connect to a container:


root@macippi:~# docker attach 05b38d77cee3

( you need to hit enter after the attach command.)


Play with your container:


apt-get update
apt-get install lynx
#                                                                                                        armbian - linux for ARM development boards (p1 of 2)
   #armbian   Feed armbian   Comments Feed alternate alternate

   Skip to content


linux for ARM development boards

     * Download
          + Work in progress
          + Deprecated
     * Getting started
          + Basics
          + Building tools
          + Package repository
          + Release history
     * Sources
     * Forum
     * Donate
          + Thanks

   23.6.2017 Bugfix update to v5.32 | Next major update is due in approximately 132 days.
     * Lightweight Debian Jessie or Ubuntu Xenial based Linux distribution.
     * Make boot image from sources with our advanced but easy-to-use tool chain.
     * Become a part of our vibrant community, contribute ideas and have fun!

   free download
   free software
   support this service
   open source
   open source
   make it on your own
   Login script shows board name with current CPU, HDD and ambient temp from external sensor, actual free memory, free disk space and battery
   XFCE desktop images come with HW accelerated video playback where possible. Pre-installed: Firefox, LibreOffice Writer, Thunderbird and others.
   You can build image or kernel with your adjustments / patches from sources with our advanced but easy-to-use tool chain.
   With help of this script you can install various applications on the top of the basic image: Samba, TV headend, ISPConfig, ...
   orange-pi-logo-400 400
   Banana Pi
     * End user documentation
-- press space for next page --
  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.
 H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list


This is tested on an Orange Pi One


Is this what you where looking for Sergio?

Link to post
Share on other sites

On 7/1/2017 at 6:41 AM, Sergio Inacio said:

You are right zador, when i tried it breaks because the ubuntu:16.04 it is not for arm.

search the docker registry for armhf   then youll find ubuntu and alpine containers to base your builds on.     ioft/armhf-ubuntu:xenial  is one i use a lot

Link to post
Share on other sites

This topic is now closed to further replies.

1 1