I have a Raspberry Pi 3 Model B+ with a Raspbian GNU/Linux 9.8 (stretch) and I am trying to build a docker container with a Dockerfile. For some reason, the date is always different inside the container. Right now it's somewhere around 2037, but I've also seen it at 1. Jan 1970.
The Dockerfile for showing this issue can be as simple as:
FROM alpine:latest
RUN date
The issue also exists when using Debian as a base image. This issue prevents me from installing packages due to invalid certificates. When running date outside the container, I get the right time. This is not the first time building a container on the Pi, but so far it always worked.
Edit:
I got closer to fixing the problem by using a different alpine version. It works now with 3.12.7. 3.13.5 resulted in "Sun Jan 0 00:100:4174038 1900". Not really sure what the issue is.