mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
chore: 重构image build
This commit is contained in:
23
packages/ui/Dockerfile
Normal file
23
packages/ui/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:18-alpine as builder
|
||||
EXPOSE 7001
|
||||
WORKDIR /workspace/
|
||||
RUN npm install -g pnpm@8.15.7 --registry=https://registry.npmmirror.com
|
||||
RUN pnpm config set registry https://registry.npmmirror.com/
|
||||
|
||||
RUN cd /workspace/certd-client && pnpm install && npm run build
|
||||
RUN cd /workspace/certd-server && pnpm install && npm run build
|
||||
|
||||
RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf
|
||||
|
||||
|
||||
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:18-alpine
|
||||
WORKDIR /app/
|
||||
COPY --from=builder /workspace/certd-server/ /app/
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV NODE_ENV production
|
||||
ENV MIDWAY_SERVER_ENV production
|
||||
CMD ["npm", "run","start"]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user