diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eda1e4..6a663cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ### v7.2.0-beta.1 (coming soon) +* switch from apt-get to apt * add env PERMISSION_CHECK ([#251](https://github.com/buanet/ioBroker.docker/issues/251)) * add some more DEBUG messages to log * add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter diff --git a/debian/node16/Dockerfile b/debian/node16/Dockerfile index 32323ae..40cb8a8 100644 --- a/debian/node16/Dockerfile +++ b/debian/node16/Dockerfile @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \ ENV DEBIAN_FRONTEND noninteractive # Install prerequisites (including node) and generating locales -RUN apt-get update && apt-get install -y \ +RUN apt update && apt install -y \ apt-utils \ cifs-utils \ curl \ @@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \ wget \ # Install node && curl -sL https://deb.nodesource.com/setup_16.x | bash \ - && apt-get update && apt-get install -y nodejs \ + && apt update && apt install -y nodejs \ # Install node-gyp && npm install -g node-gyp \ # Generating locales @@ -68,9 +68,9 @@ RUN mkdir -p /opt/scripts/.docker_config/ \ && chown root:iobroker /usr/sbin/gosu \ && chmod +s /usr/sbin/gosu \ # Clean up installation cache - && apt-get autoclean -y \ - && apt-get autoremove \ - && apt-get clean \ + && apt autoclean -y \ + && apt autoremove \ + && apt clean \ && rm -rf /tmp/* /var/tmp/* \ && rm -rf /root/.cache/* /root/.npm/* \ && rm -rf /var/lib/apt/lists/* diff --git a/debian/node18/Dockerfile b/debian/node18/Dockerfile index 61130a7..8907c78 100644 --- a/debian/node18/Dockerfile +++ b/debian/node18/Dockerfile @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \ ENV DEBIAN_FRONTEND noninteractive # Install prerequisites (including node) and generating locales -RUN apt-get update && apt-get install -y \ +RUN apt update && apt install -y \ apt-utils \ cifs-utils \ curl \ @@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \ wget \ # Install node && curl -sL https://deb.nodesource.com/setup_18.x | bash \ - && apt-get update && apt-get install -y nodejs \ + && apt update && apt install -y nodejs \ # Install node-gyp && npm install -g node-gyp \ # Generating locales @@ -68,9 +68,9 @@ RUN mkdir -p /opt/scripts/.docker_config/ \ && chown root:iobroker /usr/sbin/gosu \ && chmod +s /usr/sbin/gosu \ # Clean up installation cache - && apt-get autoclean -y \ - && apt-get autoremove \ - && apt-get clean \ + && apt autoclean -y \ + && apt autoremove \ + && apt clean \ && rm -rf /tmp/* /var/tmp/* \ && rm -rf /root/.cache/* /root/.npm/* \ && rm -rf /var/lib/apt/lists/* diff --git a/debian/scripts/setup_packages.sh b/debian/scripts/setup_packages.sh index da1ca2f..2b42ab8 100644 --- a/debian/scripts/setup_packages.sh +++ b/debian/scripts/setup_packages.sh @@ -2,13 +2,13 @@ if [ $1 == "-install" ] then - apt-get -qq update + apt -qq update packages=$(cat /opt/scripts/.docker_config/.packages) for i in $packages; do if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo "$i is not installed. Installing..." - sudo apt-get -qq -y install $i + sudo apt -qq -y install $i echo "Done." else echo "$i is already installed." @@ -16,15 +16,15 @@ then done elif [ $1 == "-update" ] then - apt-get -qq update - apt-get -qq -y upgrade + apt -qq update + apt -qq -y upgrade else echo "No paramerter found!" exit 1 fi # Silent Cleanup -apt-get -qq autoclean -y && apt-get -qq autoremove && apt-get -qq clean +apt -qq autoclean -y && apt -qq autoremove && apt -qq clean rm -rf /tmp/* /var/tmp/* && rm -rf /root/.cache/* && rm -rf /var/lib/apt/lists/* && rm -f /opt/scripts/.docker_config/.packages exit 0