Skip to content

Commit

Permalink
Added support for ARM images
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Kosmaczewski committed Jul 19, 2023
1 parent d365039 commit 1066455
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ FROM docker.io/library/node:20-alpine3.17 AS builder
RUN npm install -g pkg pkg-fetch
ENV NODE node18
ENV PLATFORM alpine
ENV ARCH x64
RUN /usr/local/bin/pkg-fetch ${NODE} ${PLATFORM} ${ARCH}
RUN /usr/local/bin/pkg-fetch ${NODE} ${PLATFORM} ${TARGETARCH}

# Run tests
WORKDIR /app
Expand All @@ -17,7 +16,7 @@ RUN npm test
RUN npm run build

# Package the result into a binary without dependencies
RUN /usr/local/bin/pkg --targets ${NODE}-${PLATFORM}-${ARCH} -o server.bin dist/src/index.js
RUN /usr/local/bin/pkg --targets ${NODE}-${PLATFORM}-${TARGETARCH} -o server.bin dist/src/index.js


# Step 2: Create the runtime image
Expand Down

0 comments on commit 1066455

Please sign in to comment.