pré supp dockerfile
This commit is contained in:
21
tmp/Dockerfile
Normal file
21
tmp/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM node:22-alpine
|
||||
RUN apk add --no-cache libc6-compat openssl
|
||||
WORKDIR /app
|
||||
ENV PATH /app/node_modules/.bin:$PATH
|
||||
|
||||
# On copie tout, on installe tout, on build tout au même endroit
|
||||
COPY . .
|
||||
RUN npm ci
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
RUN chown -R nextjs:nodejs /app
|
||||
|
||||
USER nextjs
|
||||
|
||||
# On lance directement via npm
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user