Docker: use a specific directory to build unit.
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user