mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-15 13:13:41 +08:00
ci: add docker build
This commit is contained in:
24
build/docker/Dockerfile
Normal file
24
build/docker/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM node:16.17.0 as builder
|
||||
|
||||
ENV WORKDIR=/soybean
|
||||
|
||||
WORKDIR $WORKDIR
|
||||
|
||||
COPY ./ $WORKDIR/
|
||||
|
||||
ARG version
|
||||
ENV COMMITID=$version
|
||||
|
||||
RUN npm i -g pnpm
|
||||
|
||||
RUN pnpm install
|
||||
RUN pnpm build
|
||||
|
||||
FROM nginx:alpine as prod
|
||||
|
||||
RUN mkdir /soybean
|
||||
|
||||
COPY --from=builder /soybean/dist /soybean
|
||||
COPY --from=builder /soybean/build/docker/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user