summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-03-28 13:42:55 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-03-28 13:42:55 -0700
commit22fe08681e46f57186f411ddd38cad1c21aab641 (patch)
treee520188b7c904f98144918d43b9e2931d52163b9
parent2beeb81c2fe17d41e7aa020d577cd394b49ee51e (diff)
downloadunit-22fe08681e46f57186f411ddd38cad1c21aab641.tar.gz
unit-22fe08681e46f57186f411ddd38cad1c21aab641.tar.bz2
Regenerated Dockerfiles.
-rw-r--r--pkg/docker/Dockerfile.go1.20 (renamed from pkg/docker/Dockerfile.go1.19)32
-rw-r--r--pkg/docker/Dockerfile.jsc1128
-rw-r--r--pkg/docker/Dockerfile.minimal28
-rw-r--r--pkg/docker/Dockerfile.node1830
-rw-r--r--pkg/docker/Dockerfile.perl5.3628
-rw-r--r--pkg/docker/Dockerfile.php8.2 (renamed from pkg/docker/Dockerfile.php8.1)30
-rw-r--r--pkg/docker/Dockerfile.python3.1128
-rw-r--r--pkg/docker/Dockerfile.ruby3.2 (renamed from pkg/docker/Dockerfile.ruby3.1)30
8 files changed, 99 insertions, 135 deletions
diff --git a/pkg/docker/Dockerfile.go1.19 b/pkg/docker/Dockerfile.go1.20
index a6ff837c..712b4678 100644
--- a/pkg/docker/Dockerfile.go1.19
+++ b/pkg/docker/Dockerfile.go1.20
@@ -1,8 +1,9 @@
-FROM golang:1.19 as BUILDER
+FROM golang:1.20 as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,22 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure go --go-path=$GOPATH \
&& make -j $NCPU go-install-src libunit-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM golang:1.19
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-COPY --from=BUILDER /usr/lib/*-linux-gnu/libunit.a /tmp/
-COPY --from=BUILDER /usr/include/nxt_* /usr/include/
-COPY --from=BUILDER /go/src/ /go/src/
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -66,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.jsc11 b/pkg/docker/Dockerfile.jsc11
index 501bfcda..3abcab4f 100644
--- a/pkg/docker/Dockerfile.jsc11
+++ b/pkg/docker/Dockerfile.jsc11
@@ -3,6 +3,7 @@ FROM eclipse-temurin:11-jdk as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure java --jars=/usr/share/unit-jsc-common/ \
&& make -j $NCPU java-shared-install java-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM eclipse-temurin:11-jdk
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-COPY --from=BUILDER /usr/share/unit-jsc-common/ /usr/share/unit-jsc-common/
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal
index 6101953e..77c83ef9 100644
--- a/pkg/docker/Dockerfile.minimal
+++ b/pkg/docker/Dockerfile.minimal
@@ -3,6 +3,7 @@ FROM debian:bullseye-slim as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure \
&& make -j $NCPU version \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM debian:bullseye-slim
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.node18 b/pkg/docker/Dockerfile.node18
index 27543df1..bc88a7f7 100644
--- a/pkg/docker/Dockerfile.node18
+++ b/pkg/docker/Dockerfile.node18
@@ -3,6 +3,7 @@ FROM node:18 as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,22 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \
&& make -j $NCPU node node-install libunit-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM node:18
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-COPY --from=BUILDER /usr/lib/*-linux-gnu/libunit.a /tmp/
-COPY --from=BUILDER /usr/include/nxt_* /usr/include/
-COPY --from=BUILDER /usr/local/lib/node_modules/unit-http/ /usr/local/lib/node_modules/unit-http/
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -66,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.perl5.36 b/pkg/docker/Dockerfile.perl5.36
index 8f2b8a61..99d47495 100644
--- a/pkg/docker/Dockerfile.perl5.36
+++ b/pkg/docker/Dockerfile.perl5.36
@@ -3,6 +3,7 @@ FROM perl:5.36 as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure perl \
&& make -j $NCPU perl-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM perl:5.36
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.php8.1 b/pkg/docker/Dockerfile.php8.2
index eefc4aa8..e1b70a8f 100644
--- a/pkg/docker/Dockerfile.php8.1
+++ b/pkg/docker/Dockerfile.php8.2
@@ -1,8 +1,9 @@
-FROM php:8.1-cli as BUILDER
+FROM php:8.2-cli as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure php \
&& make -j $NCPU php-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM php:8.1-cli
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-RUN ldconfig
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && ldconfig \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.python3.11 b/pkg/docker/Dockerfile.python3.11
index 744eda20..9ad6fad5 100644
--- a/pkg/docker/Dockerfile.python3.11
+++ b/pkg/docker/Dockerfile.python3.11
@@ -3,6 +3,7 @@ FROM python:3.11 as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure python --config=/usr/local/bin/python3-config \
&& make -j $NCPU python3-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM python:3.11
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && /bin/true \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
diff --git a/pkg/docker/Dockerfile.ruby3.1 b/pkg/docker/Dockerfile.ruby3.2
index 132b2b34..159541bd 100644
--- a/pkg/docker/Dockerfile.ruby3.1
+++ b/pkg/docker/Dockerfile.ruby3.2
@@ -1,8 +1,9 @@
-FROM ruby:3.1 as BUILDER
+FROM ruby:3.2 as BUILDER
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
RUN set -ex \
+ && savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
@@ -38,20 +39,12 @@ RUN set -ex \
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
&& ./configure ruby \
&& make -j $NCPU ruby-install \
- && ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt
-
-FROM ruby:3.1
-COPY docker-entrypoint.sh /usr/local/bin/
-COPY --from=BUILDER /usr/sbin/unitd /usr/sbin/unitd
-COPY --from=BUILDER /usr/sbin/unitd-debug /usr/sbin/unitd-debug
-COPY --from=BUILDER /usr/lib/unit/ /usr/lib/unit/
-COPY --from=BUILDER /requirements.apt /requirements.apt
-RUN gem install rack
-RUN set -x \
- && if [ -f "/tmp/libunit.a" ]; then \
- mv /tmp/libunit.a /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libunit.a; \
- rm -f /tmp/libunit.a; \
- fi \
+ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
+ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
+ done \
+ && apt-mark showmanual | xargs apt-mark auto > /dev/null \
+ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
+ && gem install rack \
&& mkdir -p /var/lib/unit/ \
&& mkdir /docker-entrypoint.d/ \
&& addgroup --system unit \
@@ -64,12 +57,15 @@ RUN set -x \
--gecos "unit user" \
--shell /bin/false \
unit \
- && apt update \
- && apt --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get update \
+ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \
+ && apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -f /requirements.apt \
&& ln -sf /dev/stdout /var/log/unit.log
+COPY docker-entrypoint.sh /usr/local/bin/
+
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]