Clean image
This commit is contained in:
parent
2d6c3273cb
commit
8602f8fc3f
1 changed files with 12 additions and 4 deletions
16
Dockerfile
16
Dockerfile
|
|
@ -1,6 +1,6 @@
|
|||
FROM node:20-slim
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y tzdata && rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --no-cache tzdata
|
||||
|
||||
ENV TZ=Asia/Bangkok
|
||||
|
||||
|
|
@ -8,13 +8,21 @@ WORKDIR /app
|
|||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
FROM gcr.io/distroless/nodejs20
|
||||
|
||||
ENV TZ=Asia/Bangkok
|
||||
ENV NODE_ENV=production
|
||||
ENV DEBUG=server:*
|
||||
ENV PORT=36531
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
EXPOSE 36531
|
||||
|
||||
CMD [ "npm","start" ]
|
||||
CMD ["./bin/www"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue