diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2023-08-22 14:55:10 -0700 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2023-08-22 14:55:10 -0700 |
commit | 7874798a3f372f614de2c314fc064d608e6194a8 (patch) | |
tree | ecd85a4ddd767fb24b76360dd33246db9e2cfd60 /pkg/docker/template.Dockerfile | |
parent | e516d918ed47f456e38a44bdd1cf00fe862e1d85 (diff) | |
download | unit-7874798a3f372f614de2c314fc064d608e6194a8.tar.gz unit-7874798a3f372f614de2c314fc064d608e6194a8.tar.bz2 |
Docker: use a specific directory to build unit.
Diffstat (limited to 'pkg/docker/template.Dockerfile')
-rw-r--r-- | pkg/docker/template.Dockerfile | 4 |
1 files changed, 3 insertions, 1 deletions
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 \ |