Skip to content

Commit

Permalink
Change docker base imaeg
Browse files Browse the repository at this point in the history
  • Loading branch information
JongBeom Lee committed Jan 31, 2024
1 parent a0a9809 commit 77c5812
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM node:18-slim AS builder
FROM node:alpine3.18 AS builder
WORKDIR /app
COPY . .
# Dependency for Prisma
RUN apt-get update -y && apt-get install -y openssl
RUN apk upgrade --update-cache --available && \
apk add openssl && \
rm -rf /var/cache/apk/*
RUN npm ci
RUN npm run build

FROM node:18-slim
FROM node:alpine3.18
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app ./
# Dependency for Prisma
RUN apt-get update -y && apt-get install -y openssl
RUN apk upgrade --update-cache --available && \
apk add openssl && \
rm -rf /var/cache/apk/*
EXPOSE 3000
CMD ["npm", "run", "start:prod"]

0 comments on commit 77c5812

Please sign in to comment.