forked from mj/devopsscripts
更新 front/Dockerfile
This commit is contained in:
@@ -4,6 +4,8 @@ ARG ENV=prod
|
||||
ARG COMMIT_ID=unknown
|
||||
# 2. 将参数设置为环境变量,这样在容器运行时也能读取到
|
||||
ENV VITE_GIT_COMMIT_ID=${COMMIT_ID}
|
||||
ENV VITE_PROJECT_NAME="$PROJECTCODE" \
|
||||
VITE_PROJECT_VERSION="$PROJECTVERSION"
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
|
||||
@@ -14,7 +16,6 @@ RUN set -eux; \
|
||||
apk add pnpm; \
|
||||
pnpm config set registry https://registry.npmmirror.com; \
|
||||
pnpm install; \
|
||||
echo "Building revision: ${GIT_COMMIT_ID}"; \
|
||||
pnpm build:$ENV;
|
||||
|
||||
FROM 172.31.127.251:8083/library/fileserver:1.0.0
|
||||
|
||||
Reference in New Issue
Block a user