From 7874798a3f372f614de2c314fc064d608e6194a8 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: use a specific directory to build unit. --- pkg/docker/template.Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index cac0ae85..28db58bc 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u @@VERSION@@-@@PATCHLEVEL@@ https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -52,7 +54,7 @@ RUN set -ex \ && ./configure @@CONFIGURE@@ \ && make -j $NCPU @@INSTALL@@ \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && 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 \ -- cgit