-
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
56fa52c
commit e1e4d85
Showing
9 changed files
with
23 additions
and
134 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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM python:3.12-slim | ||
ARG PYTHON_VERSION=3.12 | ||
|
||
FROM python:${PYTHON_VERSION}-slim | ||
|
||
LABEL org.opencontainers.image.authors="w0rng <[email protected]>" | ||
LABEL org.opencontainers.image.source="https://github.com/w0rng/baseimage/" | ||
|
@@ -9,17 +11,20 @@ ENV TIME_ZONE=Europe/Moscow \ | |
APP_USER=app \ | ||
APP_UID=1001 | ||
|
||
COPY ./init.sh /init.sh | ||
COPY ./pip.sh /pip | ||
COPY --chmod=111 ./init.sh /init.sh | ||
COPY --chmod=111 ./pip.sh /pip | ||
|
||
SHELL ["/bin/bash", "-exo", "pipefail", "-c" ] | ||
|
||
RUN chmod +x /init.sh /pip && \ | ||
apt update && apt --no-install-recommends install -y dumb-init curl && rm -rf /var/lib/apt/lists/* && \ | ||
RUN apt update && apt --no-install-recommends install -y dumb-init curl && rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /home/$APP_USER && \ | ||
adduser --shell /bin/bash --uid $APP_UID $APP_USER && chown -R $APP_USER:$APP_USER /home/$APP_USER && \ | ||
ln -s /usr/bin/dumb-init /sbin/dinit && \ | ||
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 && \ | ||
pip install --upgrade --no-cache-dir pip setuptools uv && \ | ||
mkdir -p ${VIRTUAL_ENV} && chown -R $APP_USER:$APP_USER ${VIRTUAL_ENV} && \ | ||
mkdir -p ${VIRTUAL_ENV} && chown -R $APP_USER:$APP_USER ${VIRTUAL_ENV} | ||
|
||
RUN pip install --upgrade --no-cache-dir pip setuptools uv && \ | ||
uv venv ${VIRTUAL_ENV} && \ | ||
rm /usr/local/bin/pip && \ | ||
mv /pip /usr/local/bin/pip && \ | ||
|
File renamed without changes.
File renamed without changes.