add test-cicd code
This commit is contained in:
16
code/sample-nodejs-app/Dockerfile
Normal file
16
code/sample-nodejs-app/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# Build stage
|
||||
FROM node:18-slim AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
|
||||
# Production stage
|
||||
FROM node:18-slim
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/package*.json ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/index.js ./
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "index.js"]
|
||||
Reference in New Issue
Block a user