Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rng committed Jun 18, 2024
1 parent d281e83 commit 6be6dfb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ FROM python:${PYTHON_VERSION}-slim
LABEL org.opencontainers.image.authors="w0rng <[email protected]>"
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 && \
Expand Down

0 comments on commit 6be6dfb

Please sign in to comment.