-
Notifications
You must be signed in to change notification settings - Fork 617
Description
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:
-
- name: Build and Push Multi-Arch Image
run: |
docker buildx build
--platform linux/amd64,linux/arm64
--file Dockerfile --file Dockerfile-ARM64
--tag repo-name/image-name:{tag}
--push .
- name: Build and Push Multi-Arch Image
-
- name: Build and push Docker image
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 }}
- name: Build and push Docker image
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?