deploy:修改Dockerfile

This commit is contained in:
fanxb 2022-07-18 13:31:59 +08:00
parent b8e7cdaf5d
commit 658eb59925
2 changed files with 3 additions and 7 deletions

View File

@ -1,6 +1,7 @@
FROM node:lts-buster-slim
WORKDIR /app
copy ./openRenamerBackend /app
COPY ./openRenamerBackend /app
RUN chmod 777 -R /app
ENV PORT 80
CMD ["bash", "start.sh"]

View File

@ -7,12 +7,7 @@ rm -rf openRenamerBackend/static/*
touch openRenamerBackend/static/.gitkeep
mv openRenamerFront/dist/* openRenamerBackend/static
# docker镜像打包
if [ ! -n $0 ]; then
echo "请传入版本号参数,如bash build.sh 0.8"
return 0
fi
# 单平台打包并推送
#docker build -t fleyx/open-renamer:$0 --push .
# 多平台打包并推送
docker buildx build -t fleyx/open-renamer:$0 --platform linux/amd64,linux/arm64 --push .
docker buildx build -t fleyx/open-renamer:$1 --platform linux/amd64,linux/arm64 --push .