Skip to content

Commit

Permalink
그리고 이건 도커파일
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Mar 8, 2024
1 parent 59ed8bf commit fdb0093
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM node:18.19-alpine AS builder

WORKDIR /app

RUN apk add --no-cache libc6-compat

COPY . ./

RUN yarn install --immutable
RUN yarn build

# 실행 단계
FROM nginx:alpine AS runner

RUN echo "\
server {\
listen 3000;\
location / {\
root /usr/share/nginx/html;\
index index.html index.htm;\
try_files \$uri \$uri/ /index.html =404;\
}\
}" > /etc/nginx/conf.d/default.conf

COPY --from=builder /app/dist /usr/share/nginx/html

# 3000포트 열기
EXPOSE 3000

# Nginx 시작
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit fdb0093

Please sign in to comment.