2024-01-03 07:30:29 +00:00
|
|
|
FROM fascinated/docker-images:node-pnpm-latest AS base
|
|
|
|
|
2024-01-03 07:25:17 +00:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /usr/src/app
|
2024-01-03 07:30:29 +00:00
|
|
|
|
2024-01-03 07:32:49 +00:00
|
|
|
COPY ["package.json", "pnpm-lock.yaml", "./"]
|
2024-01-03 07:30:29 +00:00
|
|
|
|
|
|
|
RUN pnpm install --production --silent && mv node_modules ../
|
|
|
|
|
2024-01-03 07:25:17 +00:00
|
|
|
COPY . .
|
2024-01-03 07:30:29 +00:00
|
|
|
|
2024-01-03 07:33:41 +00:00
|
|
|
#RUN chown -R node /usr/src/app
|
|
|
|
#USER node
|
2024-01-03 07:30:29 +00:00
|
|
|
|
2024-01-03 07:36:10 +00:00
|
|
|
RUN pnpm run build
|
|
|
|
|
2024-01-03 07:30:29 +00:00
|
|
|
CMD pnpm run start
|