bun + nginx Dockerfile taking 2023년 11월 14일 읽는데 약 1 분 걸려요 Photo by Rubaitul Azad / Unsplash Bun — A fast all-in-one JavaScript runtimeBundle, install, and run JavaScript & TypeScript — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner, and npm client built-in.bun을 이용하여, 기존 npm, yarn 대비 빠른 패키지 설치 및 빌드를 통해 배포를 하기 위한 메모이다.FROM oven/bun:1 as builder WORKDIR /app COPY package*.json ./ RUN bun install COPY . . RUN bun run build FROM nginx:stable-alpine RUN rm -rf /etc/nginx/conf.d/default.conf COPY --from=builder /app/nginx/default.conf /etc/nginx/conf.d/default.conf RUN rm -rf /usr/share/nginx/html/* COPY --from=builder /app/dist /usr/share/nginx/html EXPOSE 80 ENTRYPOINT ["nginx", "-g", "daemon off;"]Dockerfileserver { listen 80; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } }./nginx/default.confversion: "3" services: nw-frontend: container_name: nw-frontend build: context: . dockerfile: Dockerfile ports: - "80:80"docker-compose.yml