You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a problem to build one of our containers that have two Dockerfiles. One is for normal amd64 and and another one used for arm64. So our condition is to build those two docker files using a Git action to build and push a multi-arch image that can both be used in mac and windows. I have tried some solutions like follows:
whenever we run the workflow I'm getting the error as :
`` Run docker buildx build
#0 building with "builder-7d387e50-81ba-4f37-b2a8-6b4d790c3f09" instance using docker-container driver
#1 [internal] load build definition from Dockerfile-ARM64 #1 transferring dockerfile: 2B done #1 DONE 0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile-ARM64: no such file or directory
Error: Process completed with exit code 1. ``
But the path is absolute correct. Can anyone help with this issue?
The text was updated successfully, but these errors were encountered:
--file flag is not an array and only takes one path. In your case that would mean that only Dockerfile-ARM64 is loaded. If you have platform-specific Dockerfiles you need to build them separately and can later merge them, for example with docker buildx imagetools create command.
Your error means though that the Dockerfile-ARM64 did not exist. I don't know why, but in your 2 examples you are using different context definition so there is no way both of your examples could work together.
@tonistiigi I have not done the two above changes in a single CD action. Those are the two methods I have tried. Is their any way to build 2 Dockerfiles within a single context to build and push a Multi-arch image?
We have a problem to build one of our containers that have two Dockerfiles. One is for normal amd64 and and another one used for arm64. So our condition is to build those two docker files using a Git action to build and push a multi-arch image that can both be used in mac and windows. I have tried some solutions like follows:
run: |
docker buildx build
--platform linux/amd64,linux/arm64
--file Dockerfile --file Dockerfile-ARM64
--tag repo-name/image-name:{tag}
--push .
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v4
with:
context: container-name
file: |
container-name/Dockerfile
container-name/Dockerfile-ARM64
push: true
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}, repo-name/image-name:{tag}
labels: ${{ steps.meta.outputs.labels }}
whenever we run the workflow I'm getting the error as :
`` Run docker buildx build
#0 building with "builder-7d387e50-81ba-4f37-b2a8-6b4d790c3f09" instance using docker-container driver
#1 [internal] load build definition from Dockerfile-ARM64
#1 transferring dockerfile: 2B done
#1 DONE 0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile-ARM64: no such file or directory
Error: Process completed with exit code 1. ``
But the path is absolute correct. Can anyone help with this issue?
The text was updated successfully, but these errors were encountered: