Buildx failed to solve netcoreapp3.1 error
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Am using github action
so after github login
i use
- name: Build and push to GHCR
uses: docker/build-push-action@v3
env:
IMAGE_NAME: ${{inputs.projectPath}}
VERSION: ${{steps.path_extension.outputs.branch-type}}
GHCR: ${{ inputs.dockerRegistry }}
with:
context: .
file: ./Dockerfile
push: true # Allow conditional image push
tags: |
${{ env.GHCR }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.GHCR }}/${{ env.IMAGE_NAME }}:latest
labels: | # Optionally, add Open Container labels to your image
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.revision=${{ github.sha }}
But it shows
#5 [internal] load build context
#5 transferring context: 19.33MB 0.6s done
#5 DONE 0.6s
#4 [1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:3.1@sha256:023ed31554e39b01c90bdfaeea17dfa44f29f7dc76c9fc564e1c801e39a8bb43
#4 extracting sha256:824b15f81d6568adc139263c39805e52d9880758b907f40144bbb1938ca59323
#4 extracting sha256:824b15f81d6568adc139263c39805e52d9880758b907f40144bbb1938ca59323 1.1s done
#4 extracting sha256:ee578fb5322330a06d051151c985de158f7a84719b6a6a79c0835455dc8b1af1
#4 extracting sha256:ee578fb5322330a06d051151c985de158f7a84719b6a6a79c0835455dc8b1af1 0.5s done
#4 extracting sha256:730a18ecfd1c492ceb329b4508c6b5955dbb467e0b23c238b9828dcd3182cffc 0.1s done
#4 extracting sha256:03d86c90e8884aed0576856d7461058251c13940aa2b68bcb0edd7b3bbc0f469
#4 extracting sha256:03d86c90e8884aed0576856d7461058251c13940aa2b68bcb0edd7b3bbc0f469 0.7s done
#4 extracting sha256:5a6f0b2b6c6726c243de960e7aebd04d6c5a04dccf7e1b345f3dba040874dbad 0.1s
#4 extracting sha256:5a6f0b2b6c6726c243de960e7aebd04d6c5a04dccf7e1b345f3dba040874dbad 0.2s done
#4 DONE 4.9s
#6 [2/3] ADD build/Debug/AM.Identity.WebAPI/netcoreapp3.1/publish* build/Release/AM.Identity.WebAPI/netcoreapp3.1/publish* /app/.
#6 ERROR: lstat /var/lib/docker/tmp/buildkit-mount2181668523/build/Release/AM.Identity.WebAPI/netcoreapp3.1: no such file or directory
------
> [2/3] ADD build/Debug/AM.Identity.WebAPI/netcoreapp3.1/publish* build/Release/AM.Identity.WebAPI/netcoreapp3.1/publish* /app/.:
------
error: failed to solve: lstat /var/lib/docker/tmp/buildkit-mount2181668523/build/Release/AM.Identity.WebAPI/netcoreapp3.1: no such file or directory
Error: buildx failed with: error: failed to solve: lstat /var/lib/docker/tmp/buildkit-mount2181668523/build/Release/AM.Identity.WebAPI/netcoreapp3.1: no such file or directory
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dockerfile's ADD instruction and the GitHub Actions workflow shown in the report, then compare the referenced build paths with the build context. Reproduce the workflow and verify whether the reported missing-path error persists; done means the build completes successfully or the required path mismatch is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile, github-actions
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100