Skip to content

Commit

Permalink
test docker deploy with BUILDPLATFORM
Browse files Browse the repository at this point in the history
  • Loading branch information
pabra committed Jun 13, 2024
1 parent 52e5886 commit 84aa69e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# with:
# platforms: linux/amd64,linux/arm64,linux/arm/v7
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# use node:lts-alpine
# build hangs for arm/v7 platform on alpine image
# https://github.com/nodejs/docker-node/issues/2077
# let's use slim for now
ARG BASE_IMAGE=node:20.14.0-alpine

FROM ${BASE_IMAGE} AS builder
FROM --platform=$BUILDPLATFORM ${BASE_IMAGE} AS builder

WORKDIR /app

Expand All @@ -24,7 +27,7 @@ COPY src src/
RUN npm run test:before-publish


FROM ${BASE_IMAGE}
FROM --platform=$BUILDPLATFORM ${BASE_IMAGE}

WORKDIR /app

Expand Down

0 comments on commit 84aa69e

Please sign in to comment.