OpenAPITools / OpenAPITools/openapi-generator

Default Dockerfile for ASP.Net Core Server Fails - base image not found

Open
#19,820 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

🐛 Bug Report:

Describe the bug

When trying to build the default generated Dockerfile on an ASP.Net Core generated project, I get the following error:

[+] Building 0.4s (3/3) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 993B 0.0s
=> CANCELED [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:8.0-buster-slim 0.2s
=> ERROR [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:8.0-buster 0.2s

[internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:8.0-buster:


Dockerfile:10

8 |
9 | # Build container
10 | >>> FROM mcr.microsoft.com/dotnet/core/sdk:8.0-buster AS build
11 |
12 | # Copy the code into the container

ERROR: failed to solve: mcr.microsoft.com/dotnet/core/sdk:8.0-buster: failed to resolve source metadata for mcr.microsoft.com/dotnet/core/sdk:8.0-buster: mcr.microsoft.com/dotnet/core/sdk:8.0-buster: not found

Steps to Reproduce

Steps to reproduce the behavior:
Build a aspnetcore server, then try to build the docker file.

Expected behavior

Expect the Dockerfile to build.

Operation System (please complete the following information):
  • OS: Windows
  • Version: Latest
Package System (please complete the following information):
  • Version: Latest ASP.Net Core Server Generator
Additional Context

Looks like the base image is no longer valid (not found).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the default Dockerfile generated for the ASP.Net Core server and inspect the base-image references around line 10, including the sdk and aspnet images shown in the report. Verify the referenced tags against the available container images and build a freshly generated project. Done means the generated Dockerfile resolves its base images and builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.