From 63f3326fc7739bb1f03216ea4531b428c8fb409b Mon Sep 17 00:00:00 2001 From: Totonyus Date: Thu, 30 May 2024 21:19:28 +0200 Subject: [PATCH] Dockerfile optimization --- dockerfile | 2 +- entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfile b/dockerfile index 11ade73..d0a50df 100644 --- a/dockerfile +++ b/dockerfile @@ -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"] 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 *.py pip_requirements_$TARGET_ARCH ./ diff --git a/entrypoint.sh b/entrypoint.sh index d86a568..4b45117 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -44,7 +44,7 @@ fi 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 [ ! -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 --- pip3 install --disable-pip-version-check -q --root-user-action=ignore -r pip_requirements_$TARGET_ARCH