Skip to content

Commit

Permalink
refactor(Dockerfile): 🎨 I Need to Read Better
Browse files Browse the repository at this point in the history
  • Loading branch information
thezak48 committed Nov 9, 2024
1 parent aa15e5e commit e07635c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ LABEL maintainer="thezak48" \

RUN mkdir "${APP_DIR}" && \
mkdir "${CONFIG_DIR}" && \
useradd -u 1000 -U -d "${CONFIG_DIR}" -s /bin/false varken && \
usermod -G users varken

WORKDIR ${APP_DIR}
adduser -u 1000 -G users varken -D -h "${CONFIG_DIR}"

COPY . ${APP_DIR}

WORKDIR ${APP_DIR}

RUN \
apk add --no-cache tzdata \
&& pip install --no-cache-dir -r ${APP_DIR}/requirements.txt \
&& sed -i "s/0.0.0/${VERSION}/;s/develop/${BRANCH}/;s/1\/1\/1970/${BUILD_DATE//\//\\/}/" varken/__init__.py

CMD cp ${APP_DIR}/data/varken.example.ini ${CONFIG_DIR}/varken.example.ini && python3 ${APP_DIR}/Varken.py
CMD cp ${APP_DIR}/data/varken.example.ini ${CONFIG_DIR}/varken.example.ini && python3 ${APP_DIR}/Varken.py

0 comments on commit e07635c

Please sign in to comment.