Add minimal Node 20 Alpine Dockerfile
This commit is contained in:
parent
69155f4998
commit
1d379164ab
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install production dependencies
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install --omit=dev && npm cache clean --force
|
||||||
|
|
||||||
|
# Copy application code
|
||||||
|
COPY server.js ./
|
||||||
|
|
||||||
|
# Run as non-root user for security
|
||||||
|
RUN addgroup -S app && adduser -S app -G app
|
||||||
|
USER app
|
||||||
|
|
||||||
|
EXPOSE 3012
|
||||||
|
|
||||||
|
CMD ["node", "server.js"]
|
||||||
Loading…
x
Reference in New Issue
Block a user