[TC-837] Update base template configs
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -3,18 +3,23 @@ FROM harbor.avroid.tech/docker-hub-proxy/python:3.12
|
||||
ARG PIP_INDEX_URL
|
||||
|
||||
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
|
||||
ENV UID=999
|
||||
ENV GID=999
|
||||
ENV USER_NAME=app
|
||||
ENV USER_GROUP=${USER_NAME}
|
||||
ENV USER_HOME=/${USER_NAME}
|
||||
|
||||
WORKDIR /app
|
||||
RUN groupadd -g ${GID} ${USER_GROUP} \
|
||||
&& useradd -r -g ${GID} -u ${UID} -d ${USER_HOME} ${USER_NAME} \
|
||||
&& pip --no-cache-dir install poetry==2.0.1
|
||||
|
||||
USER ${USER_NAME}
|
||||
|
||||
WORKDIR ${USER_HOME}
|
||||
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
RUN pip --no-cache-dir install poetry \
|
||||
&& poetry export \
|
||||
--with=dev,tests,format \
|
||||
--without-hashes \
|
||||
-f requirements.txt \
|
||||
-o requirements.txt \
|
||||
&& pip install --no-cache-dir -r requirements.txt
|
||||
RUN poetry install --with=dev --no-root --no-cache
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user