Skip to content

Commit 4b52308

Browse files
committed
build image for arm64 arch
1 parent e4f5067 commit 4b52308

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

.github/workflows/docker-publish.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,32 @@ jobs:
1717
push:
1818
runs-on: ubuntu-latest
1919
if: github.event_name == 'push'
20-
21-
permissions:
22-
contents: read
23-
packages: write
20+
env:
21+
DOCKER_CLI_EXPERIMENTAL: "enabled"
2422

2523
steps:
2624
- uses: actions/checkout@v2
27-
28-
- name: Build image
29-
run: docker build . --file ./$VERSION/Dockerfile --tag $IMAGE_NAME
3025

26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v1
28+
29+
- name: Set up Docker Buildx
30+
id: buildx
31+
uses: docker/setup-buildx-action@v1
32+
with:
33+
install: true
3134

3235
- name: Login to GitHub Container Registry
3336
uses: docker/login-action@v1
3437
with:
3538
registry: ghcr.io
36-
username: ${{ github.actor }}
39+
username: ${{ github.repository_owner }}
3740
password: ${{ secrets.GITHUB_TOKEN }}
3841

39-
- name: Push image
40-
run: |
41-
IMAGE_ID=ghcr.io/vulpemventures/$IMAGE_NAME
42-
43-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
44-
45-
echo IMAGE_ID=$IMAGE_ID
46-
echo VERSION=$VERSION
47-
48-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
49-
docker push $IMAGE_ID:$VERSION
50-
51-
docker tag $IMAGE_NAME $IMAGE_ID:latest
52-
docker push $IMAGE_ID:latest
42+
- name: Build image
43+
run: >-
44+
docker buildx build --push
45+
--file ./$VERSION/Dockerfile
46+
--tag ghcr.io/vulpemventures/$IMAGE_NAME:latest
47+
--tag ghcr.io/vulpemventures/$IMAGE_NAME:$VERSION
48+
--platform linux/arm64,linux/amd64 .

0.21.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM debian:stable-slim AS builder
33
# VERSION of Elements Core to be build
44
ARG VERSION=0.21.0
55

6-
RUN apt-get update && apt-get install -y wget curl libzmq3-dev build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb-dev libdb++-dev libdb4.8
6+
RUN apt-get update && apt-get install -y wget curl libzmq3-dev build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb-dev libdb++-dev
77

88
RUN wget -qO- https://github.com/ElementsProject/elements/archive/elements-$VERSION.tar.gz | tar -xvz -C /tmp
99

0 commit comments

Comments
 (0)