Skip to content

Commit 7874798

Browse files
committed
Docker: use a specific directory to build unit.
1 parent e516d91 commit 7874798

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/docker/template.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ RUN set -ex \
1313
&& apt-get update \
1414
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
1515
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
16+
&& mkdir -p /usr/src/unit \
17+
&& cd /usr/src/unit \
1618
&& hg clone -u @@VERSION@@-@@PATCHLEVEL@@ https://hg.nginx.org/unit \
1719
&& cd unit \
1820
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
@@ -52,7 +54,7 @@ RUN set -ex \
5254
&& ./configure @@CONFIGURE@@ \
5355
&& make -j $NCPU @@INSTALL@@ \
5456
&& cd \
55-
&& rm -rf unit \
57+
&& rm -rf /usr/src/unit \
5658
&& for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
5759
ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
5860
done \

0 commit comments

Comments
 (0)