Docker: Shallow clone the Unit repo
Saves on the order of 10 MBs of transfer for each build. We call `rm -rf /usr/src/unit` later in this step, so the full repo has never appeared in our published images anyway.
This commit is contained in:
committed by
Dan Callahan
parent
d24ae5a9a4
commit
bd0abdf083
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b 1.31.1-1 https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
|
||||
&& mkdir -p /usr/src/unit \
|
||||
&& cd /usr/src/unit \
|
||||
&& git clone -b @@VERSION@@-@@PATCHLEVEL@@ https://github.com/nginx/unit \
|
||||
&& git clone --depth 1 -b @@VERSION@@-@@PATCHLEVEL@@ https://github.com/nginx/unit \
|
||||
&& cd unit \
|
||||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
|
||||
|
||||
Reference in New Issue
Block a user