Skip to content

Commit

Permalink
use apt-get instead of apt in modules/Dockerfile
Browse files Browse the repository at this point in the history
Do not use apt as it is meant to be an end-user tool.
  • Loading branch information
netsandbox authored and thresheek committed Feb 6, 2024
1 parent 610fb56 commit 77dafa6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN set -ex \
COPY ./ /modules/

RUN set -ex \
&& apt update \
&& apt install -y --no-install-suggests --no-install-recommends \
&& apt-get update \
&& apt-get install -y --no-install-suggests --no-install-recommends \
patch make wget mercurial devscripts debhelper dpkg-dev \
quilt lsb-release build-essential libxml2-utils xsltproc \
equivs git g++ libparse-recdescent-perl \
Expand Down Expand Up @@ -42,7 +42,7 @@ RUN set -ex \
# some modules require build dependencies
if [ -f /modules/$module/build-deps ]; then \
echo "Installing $module build dependencies"; \
apt update && apt install -y --no-install-suggests --no-install-recommends $(cat /modules/$module/build-deps | xargs); \
apt-get update && apt-get install -y --no-install-suggests --no-install-recommends $(cat /modules/$module/build-deps | xargs); \
fi; \
# if a module has a build dependency that is not in a distro, provide a
# shell script to fetch/build/install those
Expand Down Expand Up @@ -72,9 +72,9 @@ RUN set -ex \
FROM ${NGINX_FROM_IMAGE}
RUN --mount=type=bind,target=/tmp/packages/,source=/tmp/packages/,from=builder \
set -ex \
&& apt update \
&& apt-get update \
&& . /tmp/packages/modules.env \
&& for module in $BUILT_MODULES; do \
apt install --no-install-suggests --no-install-recommends -y /tmp/packages/nginx-module-${module}_${NGINX_VERSION}*.deb; \
apt-get install --no-install-suggests --no-install-recommends -y /tmp/packages/nginx-module-${module}_${NGINX_VERSION}*.deb; \
done \
&& rm -rf /var/lib/apt/lists/

0 comments on commit 77dafa6

Please sign in to comment.