frontend/Dockerfile

13 lines
345 B
Docker
Raw Normal View History

FROM oven/bun:1 as front
COPY . /build
2024-05-12 16:18:39 +08:00
WORKDIR /build/
RUN bun install && bun run build
FROM nginx:alpine
2024-05-12 20:45:57 +08:00
COPY --from=front /build/dist /usr/share/dist
2024-05-29 16:05:10 +08:00
RUN #rm /etc/nginx/conf.d/default.conf
# 将自定义配置文件nginx.conf复制到容器内/etc/nginx/conf.d/目录
2024-05-29 16:05:10 +08:00
#ADD ./nginx.conf /etc/nginx/conf.d/
CMD ["nginx", "-g", "daemon off;"]