From eee7122e77410f79d9bd232578087429d7185ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B3=89?= Date: Wed, 30 Mar 2022 17:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E6=97=B6?= =?UTF-8?q?=E5=80=99=20Python=20=E7=BC=BA=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67872a1..a48b4b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,13 @@ WORKDIR /workspace COPY . /workspace +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories +RUN apk update +RUN apk add --no-cache --virtual .build-deps alpine-sdk python3 + RUN npm config set registry https://registry.npmmirror.com -RUN cd /workspace/jeepay-ui-${PLATFORM} && npm install && npm run build +RUN cd /workspace/jeepay-ui-${PLATFORM} && npm install && npm run build FROM nginx:alpine @@ -30,14 +34,14 @@ RUN rm -rf /etc/nginx/conf.d/default.conf COPY --from=builder /workspace/default.conf.template /etc/nginx/templates/default.conf.template # 编译命令 -# docker buildx build . --build-arg PLATFORM=payment -t jeepay-payment:latest +# docker buildx build . --build-arg PLATFORM=cashier -t jeepay-payment:latest # docker buildx build . --build-arg PLATFORM=manager -t jeepay-manager:latest # docker buildx build . --build-arg PLATFORM=merchant -t jeepay-merchant:latest # # 如果你需要多平台镜像,你可以使用 --platform linux/amd64,linux/arm64 -# 比如 docker buildx build . --build-arg PLATFORM=merchant -t jeepay-ui-merchant:latest --platform linux/amd64,linux/arm64 +# 比如 docker buildx build . --build-arg PLATFORM=cashier -t jeepay-ui-cashier:latest --platform linux/amd64,linux/arm64 # # 启动命令 -# docker run -d -p 9226:80 -e BACKEND_HOST=172.20.0.9216 jeepay-ui-payment:latest +# docker run -d -p 9226:80 -e BACKEND_HOST=172.20.0.9216 jeepay-ui-cashier:latest # docker run -d -p 9227:80 -e BACKEND_HOST=172.20.0.9217 jeepay-ui-manager:latest # docker run -d -p 9228:80 -e BACKEND_HOST=172.20.0.9218 jeepay-ui-merchant:latest