Update libseccomp2 to resolve issues with time not being set correctly inside containers
A while ago I had issues getting a few containers to start and run properly on my Raspberry Pi. Tools like ping and nslookup would fail with errors like time.c:118: Operation not permitted, timer.c:634: fatal error: RUNTIME_CHECK(isc_time_now((&now)) == 0) failed and ping: bad address 'sunet.se'.
I realized the the time inside the containers was completely off.
Alpine containers would return:
$ date Sun Jan 0 00:100:4174038 1900.
Ubuntu and Fedora containers:
$ date Thu Jan 1 00:00:00 UTC 1970
This discovery led me to a github issue which helped me find the cause. Turns out, the culprit is libseccomp2 which needed to be updated to a newer version.
Note: Even though I didn't experience any issues updating the system and libseccomp2, I highly recommend you to backup your data in case anything would go wrong.
Start by updating your raspberry:
$ sudo apt update && sudo apt upgrade -y
Download the latest version of libseccomp2 (2.5.1-1 at the time of writing) and install it:
$ wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb $ sudo apt install ./libseccomp2_2.5.1-1_armhf.deb
Hopefully, you're all set at this point, and restarting your containers should have them set to the correct time.