I just got a Raspberry pi 4 with 8GB and a SD. I ran all the updates and went directly to install docker and discovered that many images were randomly failing. I narrowed it down to the alpine:latest image and the date function going bananas
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ docker run --rm alpine:3.12 ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=111 time=31.132 ms
64 bytes from 8.8.8.8: seq=1 ttl=110 time=112.076 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 2 packets received, 33% packet loss
round-trip min/avg/max = 31.132/71.604/112.076 ms
pi@raspberrypi:~ $ docker run --rm alpine:latest ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: clock_gettime(MONOTONIC) failed
It looks that it works with 3.12 but not in latest.
Any ideas? I just bought the raspi so maybe I didn't set up docker well?
pi@raspberrypi:/usr/bin $ docker run --rm alpine:latest date
Sun Jan 0 00:100:4174038 1900
pi@raspberrypi:/usr/bin $ docker run --rm alpine:3.12 date
Sun Feb 7 20:33:53 UTC 2021
Looks like date fails so everything else (naturally) fails.
More info
pi@raspberrypi:/etc/apt/sources.list.d $ cat docker.list
deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable
pi@raspberrypi:/etc/apt/sources.list.d $ lsb_release -cs
buster
I already tried to uninstall and reinstall docker without luck. Any ideas? Many images keep failing which renders the raspi kinda useless for my use case since I wanted to do everything with containers.
Solution: https://docs.linuxserver.io/faq#libseccomp
I copy paste here just in case:
Resolution
If you decide to do option 2 or 3, you should just need to restart the container after confirming you have libseccomp2.4.4 installed.
If 2 or 3 did not work, ensure you have an up-to-date install of Docker, refer to the official Docker docs for installation.
Option 1
Use another tag, not based on Focal. At the time of writing we currently offer a bionic tag for Plex and Jellyfin that will receive the same care as latest for the foreseeable future.
Option 2
Manually install an updated version of the library with dpkg.
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.4.4-1~bpo10+1_armhf.deb
sudo dpkg -i libseccomp2_2.4.4-1~bpo10+1_armhf.deb
Note this url may have been updated. Find the latest by browsing [here](http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/).
Option 3
Add the backports repo for DebianBuster. As seen here.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2
</code></pre>