feat: 更新Dockerfile,简化npm安装流程,修复命令行语法错误
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
1. Always chat in Chinese.
|
||||
2. Add function-level comments when generating code.
|
||||
3. My system is Mac/Windows.
|
||||
@@ -7,8 +7,7 @@ ARG USE_PROXY
|
||||
|
||||
# 根据USE_PROXY参数设置环境变量
|
||||
RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/ && \
|
||||
npm i -g nrm && nrm use taobao; \
|
||||
&& npm install -g npm@latest pnpm && pnpm i && pnpm build
|
||||
npm i -g nrm && nrm use taobao && npm install -g npm@latest pnpm && pnpm i && pnpm build
|
||||
|
||||
FROM nginx:latest
|
||||
|
||||
@@ -27,5 +26,5 @@ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 添加安全检查
|
||||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl -f http://127.0.0.1:12400/api/monitor/heathcheck || exit 1
|
||||
# CMD ["sed", "-i", "'s#NGINX_CONFIG_URL#${NGINX_CONFIG_URL}#g'", "/etc/nginx/conf.d/default.conf && nginx ", "-g", "'daemon off;'"]
|
||||
|
||||
EXPOSE 12400
|
||||
Reference in New Issue
Block a user