Ver código fonte

uat环境 dockerfile文件配置修复

mengqiankang 1 mês atrás
pai
commit
e76d277c77
2 arquivos alterados com 8 adições e 10 exclusões
  1. 4 5
      alien_gateway/Dockerfile
  2. 4 5
      alien_store/Dockerfile

+ 4 - 5
alien_gateway/Dockerfile

@@ -2,17 +2,16 @@ FROM python:3.12-slim
 
 WORKDIR /app
 
+ARG PIP_INDEX_URL=https://pypi.org/simple
+
 ENV POETRY_VIRTUALENVS_CREATE=false \
     PYTHONUNBUFFERED=1 \
     PYTHONDONTWRITEBYTECODE=1
 
-RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
-    && pip install --no-cache-dir poetry
+RUN pip install --no-cache-dir --index-url ${PIP_INDEX_URL} poetry
 
 COPY pyproject.toml poetry.lock ./
-RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
-  && poetry lock \
-  && poetry install --no-root --no-interaction --no-ansi
+RUN poetry install --no-root --no-interaction --no-ansi
 
 COPY . .
 

+ 4 - 5
alien_store/Dockerfile

@@ -2,17 +2,16 @@ FROM python:3.12-slim
 
 WORKDIR /app
 
+ARG PIP_INDEX_URL=https://pypi.org/simple
+
 ENV POETRY_VIRTUALENVS_CREATE=false \
     PYTHONUNBUFFERED=1 \
     PYTHONDONTWRITEBYTECODE=1
 
-RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
-    && pip install --no-cache-dir poetry
+RUN pip install --no-cache-dir --index-url ${PIP_INDEX_URL} poetry
 
 COPY pyproject.toml poetry.lock ./
-RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
-  && poetry lock \
-  && poetry install --no-root --no-interaction --no-ansi
+RUN poetry install --no-root --no-interaction --no-ansi
 
 COPY . .