Skip to content

Commit b398caa

Browse files
committed
Update workaround for arm64
1 parent acb541c commit b398caa

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/deploy-docker.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ on:
1111

1212
jobs:
1313
build-docker-image:
14+
runs-on: [ubuntu-22.04]
1415
strategy:
1516
matrix:
16-
runs-on: [ubuntu-22.04]
17-
runs-on: ${{ matrix.runs-on }}
17+
platform: [linux/amd64, linux/arm64]
1818

1919
steps:
2020
- name: Check out code into the Go module directory
@@ -26,6 +26,13 @@ jobs:
2626
with:
2727
images: ${{ env.REGISTRY_HOSTNAME }}/${{ env.IMAGE_NODE }}
2828

29+
# TODO: remove this when https://github.com/actions/runner-images/issues/11471 is fully resolved
30+
- name: Set up QEMU for ARM64
31+
if: matrix.platform == 'linux/arm64'
32+
uses: docker/setup-qemu-action@v3
33+
with:
34+
image: tonistiigi/binfmt:qemu-v7.0.0-28
35+
2936
- name: Set up Docker Buildx
3037
uses: docker/setup-buildx-action@v3
3138

@@ -42,7 +49,7 @@ jobs:
4249
with:
4350
context: .
4451
file: ./docker/Dockerfile
45-
platforms: linux/amd64,linux/arm64
52+
platforms: ${{ matrix.platform }}
4653
push: ${{ github.event_name != 'pull_request' }}
4754
tags: ${{ steps.meta.outputs.tags }}
4855
labels: ${{ steps.meta.outputs.labels }}

docker/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ WORKDIR /go/mx-chain-go/cmd/node
2929

3030
# ===== SECOND STAGE ======
3131
FROM ubuntu:22.04
32-
ARG DEBIAN_FRONTEND=noninteractive
33-
RUN apt-get update && apt-get --reinstall install libc-bin && apt-get upgrade -y
32+
ARG TARGETARCH
33+
RUN apt-get update -y && apt-get upgrade -y
3434

3535
COPY --from=builder "/go/mx-chain-go/cmd/node" "/go/mx-chain-go/cmd/node/"
3636

3737
# Copy architecture-specific files
38-
ARG TARGETARCH
3938
COPY --from=builder "/lib_${TARGETARCH}/*" "/lib/"
4039

4140
WORKDIR /go/mx-chain-go/cmd/node/

0 commit comments

Comments
 (0)