Skip to content

Commit

Permalink
multi-arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenasm committed Oct 26, 2023
1 parent 3df4f64 commit 6cffcae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
uses: docker/metadata-action@v5
with:
images: mohsenasm/swarm-dashboard
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -36,6 +42,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/s390x,linux/ppc64le
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM node:10-alpine AS base
RUN apk add --update tini curl \
&& rm -r /var/cache
RUN apk add --update tini lego curl && rm -r /var/cache
ENTRYPOINT ["/sbin/tini", "--"]
WORKDIR /home/node/app

Expand All @@ -21,10 +20,6 @@ RUN elm make Main.elm --output=client/index.js

FROM base AS release
WORKDIR /home/node/app
RUN wget -O lego_v4.14.2_linux_amd64.tar.gz https://github.com/go-acme/lego/releases/download/v4.14.2/lego_v4.14.2_linux_amd64.tar.gz \
&& tar -xzf lego_v4.14.2_linux_amd64.tar.gz \
&& mv ./lego /usr/local/bin/lego \
&& rm lego_v4.14.2_linux_amd64.tar.gz
ENV LEGO_PATH=/lego-files

COPY --from=dependencies /home/node/app/node_modules node_modules
Expand Down

0 comments on commit 6cffcae

Please sign in to comment.