Last active
February 25, 2023 11:28
-
-
Save o-az/634545376fd13fc1fc882cc4a664289c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM node:lts-alpine AS builder | |
| ARG PNPM_HOME="/root/.local/share/pnpm" | |
| ARG PATH="${PATH}:${PNPM_HOME}" | |
| WORKDIR /app | |
| COPY . . | |
| RUN npx --yes pnpm add --global pnpm@latest && \ | |
| pnpm install --frozen-lockfile && \ | |
| pnpm build | |
| FROM gcr.io/distroless/nodejs18-debian11 | |
| ARG PORT=3004 | |
| WORKDIR /app | |
| COPY --from=builder /app/dist/index.cjs index.cjs | |
| # | |
| # Distroless image has `ENTRYPOINT` set to `node` by default, | |
| # So we don't need to specify `node` here. | |
| CMD [ "index.cjs" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment