buildx
buildx copied to clipboard
Buildx failed to solve netcoreapp3.1 error
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
Can you post your Dockerfile please?
It's running in github hosted runner so may be unable to find that . can you let me know where can i find that