geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Docker on Pi64

Sat Aug 24, 2019 3:50 pm

Docker , https://en.wikipedia.org/wiki/Docker_(software) , is up and running on RPi4-4 / 64 bit Gentoo.
Attachments
debian_alpine_docker_images_ Pi64.jpg
debian_alpine_docker_images_ Pi64.jpg (62.78 KiB) Viewed 2368 times

User avatar
sakaki
Posts: 376
Joined: Sun Jul 16, 2017 1:11 pm

Re: Docker on Pi64

Sat Aug 24, 2019 4:30 pm

Nice work: I haven't tried that myself yet on a Pi4 ^-^

Any surprises / required tweaks / things to look out for?

Best, sakaki

geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Docker on Pi64

Sat Aug 24, 2019 6:43 pm

sakaki wrote:
Sat Aug 24, 2019 4:30 pm
Nice work: I haven't tried that myself yet on a Pi4 ^-^

Any surprises / required tweaks / things to look out for?

Best, sakaki
Thanks Sakaki for making it all very easy with your clear explanations.

After reading various Gentoo wiki, just followed the clear suggestions that showed up after ' sudo emerge docker '..
There was no tweaking at all and it took less than 10 minutes to get the latest docker (version 19.03.1) up and running.

Got the 'exec error' at the first attempt at alpine, but then remembered that the the CPU is ARM and went for armhf/alpine, making every thing so smooth.

User avatar
Gavinmc42
Posts: 3897
Joined: Wed Aug 28, 2013 3:31 am

Re: Docker on Pi64

Sun Aug 25, 2019 7:48 am

Hmm, will it run Raspbian Lite and PiCore?
Docker is something a Desktop PC would run :D
Never bothered with it before.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Docker on Pi64

Sun Aug 25, 2019 8:36 pm

Gavinmc42 wrote:
Sun Aug 25, 2019 7:48 am
Hmm, will it run Raspbian Lite and PiCore?
Docker is something a Desktop PC would run :D
Never bothered with it before.
Just tried this https://hub.docker.com/r/raspbian/stretch

Code: Select all

docker pull raspbian/stretch
pi64 ~ # docker run -i -t  82ca4d7b3224  /bin/sh
# apt update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://archive.raspbian.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [221 kB]
Get:4 http://archive.raspbian.org/raspbian stretch/firmware Sources [677 B]
Get:5 http://archive.raspbian.org/raspbian stretch/contrib Sources [88.1 kB]
Get:6 http://archive.raspbian.org/raspbian stretch/non-free Sources [148 kB]
Get:7 http://archive.raspbian.org/raspbian stretch/rpi Sources [1097 B]
Get:8 http://archive.raspbian.org/raspbian stretch/main Sources [12.3 MB]
Get:9 http://archive.raspbian.org/raspbian stretch/rpi armhf Packages [1299 B]
Get:10 http://archive.raspbian.org/raspbian stretch/non-free armhf Packages [116 kB]
Get:11 http://archive.raspbian.org/raspbian stretch/main armhf Packages [16.4 MB]
Get:12 http://archive.raspbian.org/raspbian stretch/firmware armhf Packages [1201 B]
Get:13 http://archive.raspbian.org/raspbian stretch/contrib armhf Packages [66.2 kB]
Fetched 29.4 MB in 8s (3399 kB/s)     
and there is a 64 bit raspbian to play with...
piCore ,https://hub.docker.com/r/generalaardvark/docker-picore/ , may also work with few clicks.
Attachments
64bit_rasbian_lite_docker_p64.jpg
64bit_rasbian_lite_docker_p64.jpg (62.67 KiB) Viewed 2284 times

User avatar
Gavinmc42
Posts: 3897
Joined: Wed Aug 28, 2013 3:31 am

Re: Docker on Pi64

Mon Aug 26, 2019 12:12 am

So cool, one more thing to add to the list of things to learn.

How many servers can you make if you use PiCore instead of Alpine?
For my PiCore servers I use busyboxhttpd
Not sure how Docker works yet, but it works on Gentoo64 :D

Perhaps Sakaki can put this on her Binhost?
Then it should take even less time to install.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
sakaki
Posts: 376
Joined: Sun Jul 16, 2017 1:11 pm

Re: Docker on Pi64

Tue Aug 27, 2019 10:26 am

Gavinmc42 wrote:
Mon Aug 26, 2019 12:12 am
Not sure how Docker works yet, but it works on Gentoo64 :D

Perhaps Sakaki can put this on her Binhost?
Then it should take even less time to install.
Now done (and part of the autobuild list) ^-^
Please let me know if the default USE flags aren't appropriate for this package, as I can easily change them.

Best, sakaki

geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Docker on Pi64

Wed Aug 28, 2019 7:43 am

Gavinmc42 wrote:
Mon Aug 26, 2019 12:12 am
..
How many servers can you make if you use PiCore instead of Alpine?
For my PiCore servers I use busyboxhttpd
..
Hi Gavinmc42,
Just found out that there is a standalone 'Docker busybox' image and that is < 2MB :P
Alpine is ~5MB , so can now run even more 'busybox http servers' ..

Code: Select all

pi64 ~ # docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
da8a3fadc9dd: Pull complete
Digest: sha256:9f1003c480699be56815db0f8146ad2e22efea85129b5b5983d0e0fb52d9ab70
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest
docker.io/library/busybox:latestpi64 ~ # docker image ls
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
geev03                    latest              cc1f22762591        45 hours ago        15.2MB
centos                    latest              0cb4fb73950e        7 days ago          239MB
alpine                    latest              915beeae4675        7 days ago          5.33MB
debian                    latest              1a2629e7d71d        2 weeks ago         108MB
busybox                   latest              acee11fb025d        5 weeks ago         1.35MB

epoch1970
Posts: 3786
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Docker on Pi64

Wed Aug 28, 2019 8:35 am

Picore as a docker container doesn’t make a lot of sense. In a way TCL already works like containers with its loop mounts design so it is redundant (if it works at all in a container).

For a long time boot2docker, now replaced by Docker Machine (or some other marketing name), was Docker’s minimal Linux install running docker engine. Boot2docker used TCL and a few select .tcz. The github project is still online.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

epoch1970
Posts: 3786
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Docker on Pi64

Wed Aug 28, 2019 9:44 am

sakaki wrote:
Sat Aug 24, 2019 4:30 pm
Any surprises / required tweaks / things to look out for?
I’d generally aim for released versions of Docker CE (and matching Compose). Releases are not free of regressions, however stable they are supposed to be.

Docker Engine: there is somewhere in docker’s github repos a contrib bash script that checks if the running kernel matches Dockers prerequisites: cgroups, a lot of iptables modules, ipvs, filesystems... Every regular .defconfig should match I believe.
Otherwise, running “docker info” and a quick demo install of service and stack would show if the kernel matches requirements.

Docker-compose is IMHO porky (uses lots of python modules), buggy and unstable. It’s part of the recommended workflow so you really can’t dispense with it.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
Gavinmc42
Posts: 3897
Joined: Wed Aug 28, 2013 3:31 am

Re: Docker on Pi64

Wed Aug 28, 2019 10:48 am

Did not now Alpine was so small.
Docker Busybox?
Docker Busybox looks interesting as my PiCore Pi embedded gadget don't need much else.

I have run into Barebox, not the same thing.

Going to have to try this Docker stuff.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Docker on Pi64

Wed Aug 28, 2019 7:30 pm

Did a fresh install on Pi3B to check how far Docker can go in 1GB RAM..
It all went very well with 'docker run -it alpine /bin/sh' :mrgreen:

Code: Select all

login as: demouser
Using keyboard-interactive authentication.
Password:

==============================================================================
|    Welcome to 64-bit Gentoo Linux for the Raspberry Pi 3 Model B & B+!     |
|         MicroSD-card image maintainer: sakaki <sakaki@deciban.com>         |
==============================================================================
| There is ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law |
==============================================================================
|            (Edit, or delete, /etc/motd to modify this message)             |
==============================================================================

demouser@pi64 ~ $ sudo -i
pi64 ~ # /etc/init.d/docker start
 * Caching service dependencies ...                                       [ ok ]
 * /var/log/docker.log: creating file
 * /var/log/docker.log: correcting owner
 * Starting docker ...                                                    [ ok ]
pi64 ~ # docker run -it alpine /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
29bddadc8f3f: Pull complete
Digest: sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb
Status: Downloaded newer image for alpine:latest
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/aarch64/APKINDEX.tar.gz
v3.10.2-19-g264df00ff8 [http://dl-cdn.alpinelinux.org/alpine/v3.10/main]
v3.10.2-20-ga23f3d183a [http://dl-cdn.alpinelinux.org/alpine/v3.10/community]
OK: 10156 distinct packages available
/ # uname -a
Linux e6985c000887 4.19.49-v8-4395da031338-bis+ #2 SMP PREEMPT Tue Jun 11 13:28:12 GMT 2019 aarch64 Linux

/ # free -m
              total        used        free      shared  buff/cache   available
Mem:            864         643          80          36         139         209
Swap:          1023          76         947

/ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
overlay               29177780   8816336  20229720  30% /
tmpfs                    65536         0     65536   0% /dev
tmpfs                   442380         0    442380   0% /sys/fs/cgroup
shm                      65536         0     65536   0% /dev/shm
/dev/root             29177780   8816336  20229720  30% /etc/resolv.conf
/dev/root             29177780   8816336  20229720  30% /etc/hostname
/dev/root             29177780   8816336  20229720  30% /etc/hosts
tmpfs                   442380         0    442380   0% /proc/asound
tmpfs                    65536         0     65536   0% /proc/keys
tmpfs                    65536         0     65536   0% /proc/latency_stats
tmpfs                    65536         0     65536   0% /proc/timer_list
tmpfs                    65536         0     65536   0% /proc/sched_debug
tmpfs                   442380         0    442380   0% /sys/firmware
/ #

geev03
Posts: 130
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Docker on Pi64

Thu Aug 29, 2019 9:32 am

Gavinmc42 wrote:
Wed Aug 28, 2019 10:48 am
.....

Going to have to try this Docker stuff.
This( https://www.infoq.com/articles/docker-future/ ) 5 year old informative article is still useful as "..The changes here will make the question of ‘what happens to Docker?’ much less important than ‘what happens to the IT industry as a result of Docker?’. .."

User avatar
Gavinmc42
Posts: 3897
Joined: Wed Aug 28, 2013 3:31 am

Re: Docker on Pi64

Thu Aug 29, 2019 10:31 am

Thanks for the link, bookmarked it for reading when the brain is working.
I have always regarded Docker as mainstream IT stuff and that's not what I do.
But with it working on Pi's it is now on my list of something that might be useful if I knew what it does ;)

These Pis are making my learning non stop,
Once I get close to knowing how something works they release a new Pi with even more capabilities and even more to learn.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Gentoo”