Sergio Inacio Posted June 30, 2017 Posted June 30, 2017 In order to do a new image in armbian, what is the correct docker baseimage to as parent? The ones I found are for rpi. As i have a bpi, to get it all working do i need a specific bpi baseimage to it?
Sergio Inacio Posted June 30, 2017 Author Posted June 30, 2017 Get:2 http://archive.raspbian.org jessie/main armhf Packages [13.3 MB] Fetched 13.3 MB in 23s (579 kB/s) Reading package lists... E: Unable to locate package linux-headers-4.11.6-sunxi Yah... no way. Need to do it from the scratch.
op1tjaap Posted June 30, 2017 Posted June 30, 2017 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 WORKDIR /root RUN git clone https://github.com/igorpecovnik/lib/ RUN cp lib/compile.sh . 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
zador.blood.stained Posted July 1, 2017 Posted July 1, 2017 10 hours ago, op1tjaap said: In the Armbian build environment there is a Dockerfile. I believe this post is about Docker on Armbian (on armhf and arm64), not docker for building Armbian (on x86_64)
Sergio Inacio Posted July 1, 2017 Author Posted July 1, 2017 You are right zador, when i tried it breaks because the ubuntu:16.04 it is not for arm.
op1tjaap Posted July 1, 2017 Posted July 1, 2017 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: https://forum.armbian.com/index.php?/topic/1328-docker-on-h3-armbian/
op1tjaap Posted July 3, 2017 Posted July 3, 2017 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: https://www.armbian.com/banana-pi/ Or build it yourself. And yes, you could use docker for the Armbian build enviroment. Then install docker: curl -sSL get.docker.com | sh That's all. Docker gets installed: + sh -c apt-get update Hit:1 http://ports.ubuntu.com xenial InRelease Get:2 http://ftp.de.debian.org/debian sid InRelease [255 kB] Hit:3 http://apt.armbian.com xenial InRelease <cut> ....... ....... </cut> + sh -c docker version Client: 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 Server: 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 https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface 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:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:fff:fe2d:3393/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 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 root@05b38d77cee3:/# ( you need to hit enter after the attach command.) Play with your container: apt-get update ..... apt-get install lynx ....... lynx www.armbian.com # armbian - linux for ARM development boards (p1 of 2) #armbian Feed armbian Comments Feed alternate alternate Skip to content armbian 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 download free software Donate donate support this service open source open source make it on your own [login_prompt-orange2.png] Login script shows board name with current CPU, HDD and ambient temp from external sensor, actual free memory, free disk space and battery conditions. [SCQXB1C-1024x576.png] XFCE desktop images come with HW accelerated video playback where possible. Pre-installed: Firefox, LibreOffice Writer, Thunderbird and others. [21.png] You can build image or kernel with your adjustments / patches from sources with our advanced but easy-to-use tool chain. [51.png] With help of this script you can install various applications on the top of the basic image: Samba, TV headend, ISPConfig, ... Olimex Linksprite orange-pi-logo-400 400 Banana Pi cubieboard_banner udoologo solidrunlogo 11043042_1035729696443207_4286082885574593168_n lemaker beelink * 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?
lanefu Posted July 4, 2017 Posted July 4, 2017 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 1
Recommended Posts