Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shanyan-wcx authored May 7, 2024
1 parent ae13187 commit b5840ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM alpine:latest AS builder
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
RUN apk add --no-cache --update nodejs npm
WORKDIR /app
COPY package.json /app/package.json
Expand All @@ -7,8 +9,10 @@ RUN npm install
COPY . /app

FROM alpine:latest
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
RUN apk add --no-cache --update nodejs npm
WORKDIR /app
COPY --from=builder /app .
EXPOSE 7814
CMD npm start
CMD npm start

0 comments on commit b5840ad

Please sign in to comment.