Unable to install the curl in the docker image using the RUN option in Dockerfile

I’m trying to install the curl package in the ubuntu docker image using RUN option in Dockerfile. Please suggest.

Error Body:

@con]# docker image build .
                                                                                                                                                                                                      0.0s
 => ERROR [3/3] RUN apt -y update && apt -y install curl                                                                                                                                                                          15.5s
------
 > [3/3] RUN apt -y update && apt -y install curl:
1.292
1.300 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
1.301
1.867 Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
1.874 Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
3.059 Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
3.346 Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
3.869 Get:5 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
4.264 Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
9.558 Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
9.988 Get:8 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
11.95 Reading package lists...
13.86 E: Release file for http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease is not valid yet (invalid for another 3d 20h 41min 34s). Updates for this repository will not be applied.
13.86 E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease is not valid yet (invalid for another 3d 20h 42min 17s). Updates for this repository will not be applied.
13.86 E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease is not valid yet (invalid for another 2d 0h 37min 49s). Updates for this repository will not be applied.
------
Dockerfile:4
--------------------
   2 |     FROM ubuntu
   3 |     COPY . /app
   4 | >>> RUN apt -y update && apt -y install curl
   5 |     ENTRYPOINT [ "/app/app.sh" ]
   6 |     CMD [ "--argument" ]
--------------------
ERROR: failed to solve: process "/bin/sh -c apt -y update && apt -y install curl" did not complete successfully: exit code: 100

I would check the current time on the server. I don’t think I have ever seen this error message, but it could mean that the time on your server is not synchronized correctly.