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 update \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
|
&& 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/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 \
|
&& hg clone -u @@VERSION@@-@@PATCHLEVEL@@ https://hg.nginx.org/unit \
|
||||||
&& cd unit \
|
&& cd unit \
|
||||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||||
@@ -52,7 +54,7 @@ RUN set -ex \
|
|||||||
&& ./configure @@CONFIGURE@@ \
|
&& ./configure @@CONFIGURE@@ \
|
||||||
&& make -j $NCPU @@INSTALL@@ \
|
&& make -j $NCPU @@INSTALL@@ \
|
||||||
&& cd \
|
&& cd \
|
||||||
&& rm -rf unit \
|
&& rm -rf /usr/src/unit \
|
||||||
&& for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
|
&& 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; \
|
ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
|
||||||
done \
|
done \
|
||||||
|
|||||||
Reference in New Issue
Block a user