Skip to content

Commit

Permalink
Add ARM Docker image support
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisiang committed Apr 8, 2022
1 parent f32c872 commit ca9a639
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pow-shield:latest
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM node:16 AS BUILD_IMAGE
RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin
WORKDIR /build
COPY . .
RUN npm ci && npm run build
RUN npm prune --production
RUN /usr/local/bin/node-prune
ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN npm install
RUN npm run build

FROM node:16-alpine
WORKDIR /usr/src/pow-shield
Expand Down

0 comments on commit ca9a639

Please sign in to comment.