I am trying to update a ubuntu container with a dockerfile.
RUN apt-get update -y
But I am getting the below error.
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 9h 14min 10s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 9h 14min 16s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 9h 14min 35s). Updates for this repository will not be applied.
I checked some other solutions to the same problem like adding Acquire::Check-Valid-Until=false
to apt-get like below
RUN apt-get -o Acquire::Check-Valid-Until="false" update -y
The above also fails.