forked from mj/devopsscripts
初次提交
This commit is contained in:
18
front/Dockerfile
Normal file
18
front/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM node:18.20.0-alpine as builder
|
||||
ARG ENV=prod
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
RUN set -eux; \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
|
||||
apk update && apk upgrade; \
|
||||
apk add git zlib zlib-dev autoconf automake libtool; \
|
||||
apk add yarn; \
|
||||
yarn config set registry https://registry.npmmirror.com; \
|
||||
yarn --ignore-scripts && yarn build:$ENV;
|
||||
|
||||
FROM harbor.zzmjart.com/library/fileserver:1.0.0
|
||||
ARG PROJECTCODE
|
||||
ARG PROJECTVERSION
|
||||
ENV PROJECT_NAME="$PROJECTCODE" \
|
||||
PROJECT_VERSION="$PROJECTVERSION"
|
||||
COPY --from=builder /usr/src/app/dist/ /usr/local/app/
|
||||
Reference in New Issue
Block a user