Docker Build fails when I try to RUN apt-get

Adebayo,Adeniyi (HHSC) 5 Reputation points
2024-05-14T18:33:40+00:00

I am upgrading my application from .NET 6 to .NET 8. I am using a pod with ubuntu to compile and build my application due to compatibility issues with RHEL7.

FROM mcr.microsoft.com/dotnet/aspnet:8.0

RUN apt update --fix-missing && apt install -y --no-install-recommends \

libc6-dev \

libgdiplus \

libx11-dev
```When I run my docker file gets to this line above, I get an error (I don't get this error in aspnet:6.0), docker build is happening on RHEL7 after compile and build is done on ubuntu.


```powershell
Step 2/9 : RUN apt update --fix-missing && apt install -y --no-install-recommends     libc6-dev     libgdiplus     libx11-dev
 ---> Running in 96c0735e8d89


WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Err:1 http://deb.debian.org/debian bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY F8D2585B8783D481
Err:2 http://deb.debian.org/debian bookworm-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
Reading package lists...
W: GPG error: http://deb.debian.org/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY F8D2585B8783D481
E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
W: GPG error: http://deb.debian.org/debian bookworm-updates InRelease: The following signatures couldn't be verified becau
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,668 questions
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.