Dockerfile optimization

This commit is contained in:
Totonyus 2024-05-30 21:19:28 +02:00
parent bc25f506be
commit 63f3326fc7
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ ENV UID=1000 GID=1000 GIT_BRANCH=$GIT_BRANCH GIT_REVISION=$GIT_REVISION DATE=$DA
VOLUME ["/app/params", "/app/data", "/app/downloads", "/app/logs"] VOLUME ["/app/params", "/app/data", "/app/downloads", "/app/logs"]
EXPOSE 80 EXPOSE 80
RUN if [ "$TARGET_ARCH" = "arm" ] ; then apt install gcc python3-dev -y && apt-get autoremove && apt-get -y clean && rm -rf /var/lib/apt/lists/*; fi RUN if [ "$TARGET_ARCH" = "arm" ] ; then apt update && apt install gcc python3-dev -y && apt-get autoremove && apt-get -y clean && rm -rf /var/lib/apt/lists/*; fi
COPY --chmod=755 entrypoint.sh ./ COPY --chmod=755 entrypoint.sh ./
COPY *.py pip_requirements_$TARGET_ARCH ./ COPY *.py pip_requirements_$TARGET_ARCH ./

View File

@ -44,7 +44,7 @@ fi
breaking_changes=$(cat BREAKING_CHANGES_VERSION 2> /dev/null) breaking_changes=$(cat BREAKING_CHANGES_VERSION 2> /dev/null)
# If BREAKING_CHANGES_VERSION not present or different from dockerfile, it means it's the container init. Install all dependencies # If BREAKING_CHANGES_VERSION not present or different from dockerfile, it means it's the container init. Install all dependencies
if [ ! -e BREAKING_CHANGES_VERSION ] || [ ! $breaking_changes -eq "$BREAKING_CHANGES_VERSION" ]; then if [ ! -e BREAKING_CHANGES_VERSION ] || [ ! "$breaking_changes" -eq "$BREAKING_CHANGES_VERSION" ]; then
echo --- Installing ydl_api_ng requirements --- echo --- Installing ydl_api_ng requirements ---
pip3 install --disable-pip-version-check -q --root-user-action=ignore -r pip_requirements_$TARGET_ARCH pip3 install --disable-pip-version-check -q --root-user-action=ignore -r pip_requirements_$TARGET_ARCH