First basic setup commit

This commit is contained in:
Torsten Raudssus 2024-10-03 03:16:49 +02:00
commit d601b9cf53
6 changed files with 180 additions and 0 deletions

29
Dockerfile Normal file
View file

@ -0,0 +1,29 @@
FROM python:3-bookworm
ARG SRV_UID="1000"
ARG SRV_GID="1001"
ARG SRV_VERSION="0"
ENV SRV_UID $SRV_UID
ENV SRV_GID $SRV_GID
ENV SRV_VERSION $SRV_VERSION
ENV SRV_APT_GET_INSTALL $SRV_APT_GET_INSTALL
RUN apt-get update -y && apt-get install -y jq $SRV_APT_GET_INSTALL \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN ( id -g $SRV_GID || groupadd -g $SRV_GID srv ) && \
( id $SRV_UID || useradd -s /bin/bash -d /app -u $SRV_UID -g $SRV_GID srv ) && \
install -o $SRV_UID -g $SRV_GID -d /app
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
USER $SRV_UID:$SRV_GID
RUN ln -s /app/.bash_history $HOME/.bash_history
VOLUME /app
WORKDIR /app
ENTRYPOINT ["/docker-entrypoint.sh"]