-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
w0rng
committed
Jun 18, 2024
1 parent
d281e83
commit 6be6dfb
Showing
1 changed file
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 && \ | ||
|