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

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