Skip to content

Commit

Permalink
build image for arm64 arch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiero committed Nov 23, 2021
1 parent e4f5067 commit 4b52308
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,32 @@ jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'

permissions:
contents: read
packages: write
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"

steps:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file ./$VERSION/Dockerfile --tag $IMAGE_NAME

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
run: |
IMAGE_ID=ghcr.io/vulpemventures/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
- name: Build image
run: >-
docker buildx build --push
--file ./$VERSION/Dockerfile
--tag ghcr.io/vulpemventures/$IMAGE_NAME:latest
--tag ghcr.io/vulpemventures/$IMAGE_NAME:$VERSION
--platform linux/arm64,linux/amd64 .
2 changes: 1 addition & 1 deletion 0.21.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM debian:stable-slim AS builder
# VERSION of Elements Core to be build
ARG VERSION=0.21.0

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
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

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

Expand Down

0 comments on commit 4b52308

Please sign in to comment.