Skip to content

Commit

Permalink
support arm64 in the dockerfile as well
Browse files Browse the repository at this point in the history
  • Loading branch information
saikonen committed Feb 19, 2025
1 parent 6f2f34a commit 583b45e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM node:20-alpine AS build
FROM node:20-alpine AS amd64-build
FROM arm64v8/node:20-alpine AS arm64-build
FROM ${TARGETARCH}-build AS build

ARG BUILD_TIMESTAMP
ARG BUILD_COMMIT_HASH
Expand All @@ -17,7 +19,10 @@ RUN yarn --frozen-lockfile
COPY . ./
RUN yarn build

FROM nginx
# https://github.com/docker-library/official-images#architectures-other-than-amd64
FROM nginx AS amd64-nginx
FROM arm64v8/nginx AS arm64-nginx
FROM ${TARGETARCH}-nginx

ENV PORT=3000
ENV METAFLOW_SERVICE=/api
Expand All @@ -28,6 +33,5 @@ ENV METAFLOW_HEAD=''
ENV METAFLOW_BODY_BEFORE=''
ENV METAFLOW_BODY_AFTER=''
ENV MF_DEFAULT_TIME_FILTER_DAYS=''

COPY --from=build /app/build /usr/share/nginx/html
COPY nginx.conf.template /etc/nginx/templates/default.conf.template

0 comments on commit 583b45e

Please sign in to comment.