fix(docker): 移除Dockerfile中的hosts配置并添加到docker run命令
Some checks failed
CI / build (20.15.1) (push) Failing after 23m22s

将hosts配置从Dockerfile中移除,改为在docker run命令中使用--add-host参数添加
This commit is contained in:
shanshanzhong 2025-12-07 09:11:56 -08:00
parent 162f8fe040
commit a5b4302ab7
3 changed files with 2 additions and 5 deletions

View File

@ -574,6 +574,7 @@ jobs:
echo "启动新容器..."
docker run -d \
--add-host api.airoport.co:103.150.215.40 \
--name ppanel-admin-web \
--restart unless-stopped \
-p 3001:3000 \
@ -723,6 +724,7 @@ jobs:
echo "启动新容器..."
docker run -d \
--add-host api.airoport.co:103.150.215.40 \
--name ppanel-user-web \
--restart unless-stopped \
-p 3002:3000 \

View File

@ -8,8 +8,6 @@ WORKDIR /app
RUN groupadd -r -g 1001 nodejs && \
useradd -r -u 1001 -g nodejs -d /home/nextjs -m nextjs
RUN echo "103.150.215.40 api.airoport.co" >> /etc/hosts
# Change to non-root user
USER nextjs

View File

@ -16,9 +16,6 @@ COPY ./apps/user/public ./apps/user/public
# Change ownership to non-root user
RUN chown -R nextjs:nodejs /app
RUN echo "103.150.215.40 api.airoport.co" >> /etc/hosts
USER nextjs
# Disable Next.js telemetry