From 6be6dfb9945cc1bc2bdf94811f5365bb3d8b8044 Mon Sep 17 00:00:00 2001 From: w0rng Date: Tue, 18 Jun 2024 11:03:26 +0700 Subject: [PATCH] clean --- python/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/python/Dockerfile b/python/Dockerfile index 83a7da9..8249b54 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -5,23 +5,21 @@ FROM python:${PYTHON_VERSION}-slim LABEL org.opencontainers.image.authors="w0rng " LABEL org.opencontainers.image.source="https://github.com/w0rng/baseimage/" -ENV TIME_ZONE=Europe/Moscow \ - VIRTUAL_ENV=/venv \ - TERM=xterm-color \ - APP_USER=app \ +ARG APP_USER=app +ARG VIRTUAL_ENV=/venv + +ENV TIME_ZONE=Europe/Moscow \ + TERM=xterm-color \ APP_UID=1001 COPY --chmod=111 ./init.sh /init.sh COPY --chmod=111 ./pip.sh /pip -SHELL ["/bin/bash", "-exo", "pipefail", "-c" ] RUN apt update && apt --no-install-recommends install -y dumb-init curl && rm -rf /var/lib/apt/lists/* && \ - mkdir -p /home/$APP_USER && \ ln -s /usr/bin/dumb-init /sbin/dinit -RUN adduser --shell /bin/bash --uid $APP_UID $APP_USER && chown -R $APP_USER:$APP_USER /home/$APP_USER && \ - mkdir -p /app && chown -R $APP_USER:$APP_USER /app && \ +RUN adduser --shell /bin/bash --uid $APP_UID $APP_USER --disabled-password --home=/app && \ mkdir -p ${VIRTUAL_ENV} && chown -R $APP_USER:$APP_USER ${VIRTUAL_ENV} RUN pip install --upgrade --no-cache-dir pip setuptools uv && \