diff options
author | Raphael <mail@raphaelkabo.com> | 2024-08-01 08:39:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 08:39:05 +0100 |
commit | 0e01f8f0e64591e6cdb0d4ea7075ec0da616938c (patch) | |
tree | b7ec508ff28a1e7281cc94fa8f46999a528f7dfa /Dockerfile | |
parent | 04b386b5eec06549c989ed81aaf2eb9b76e49b87 (diff) | |
parent | 19d892d254ea66cf67d3fa4c20bb41d495598f33 (diff) |
Merge pull request #166 from lowercasename/rk/ghcr
Publish container to GHCR
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,6 @@ -FROM node:20-alpine +# Docker builds hang in arm/v7 images, so we use Node 18 to build and Node 20 to run +# Cf. https://github.com/docker/build-push-action/issues/1071 +FROM node:18-alpine AS BUILD_IMAGE WORKDIR /app RUN apk add --no-cache python3 build-base ADD package.json pnpm-lock.yaml /app/ @@ -8,4 +10,10 @@ COPY . /app/ # Always exit 0 here because TSC will fail while we're migrating to TypeScript but # not everything uses TypeScript RUN pnpm run build; exit 0 + +# Now we run the app +FROM node:20-alpine +ENV NODE_ENV=production +WORKDIR /app +COPY --from=BUILD_IMAGE /app ./ CMD ["node", "dist/start.js"] |