summaryrefslogtreecommitdiffhomepage
path: root/pkg/docker/template.Dockerfile
diff options
context:
space:
mode:
authorDan Callahan <d.callahan@f5.com>2024-02-19 12:59:22 +0000
committerDan Callahan <dan.callahan@gmail.com>2024-02-20 12:35:50 +0000
commitbd0abdf0838f3dd8952825332fb7631d85f51a34 (patch)
tree6da4da30a5c3d800ad0eac93b3b6d424cfb503ea /pkg/docker/template.Dockerfile
parentd24ae5a9a4b1140695e027087e72dcfdeb484ec0 (diff)
downloadunit-bd0abdf0838f3dd8952825332fb7631d85f51a34.tar.gz
unit-bd0abdf0838f3dd8952825332fb7631d85f51a34.tar.bz2
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.
Diffstat (limited to 'pkg/docker/template.Dockerfile')
-rw-r--r--pkg/docker/template.Dockerfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile
index 70951747..edf9ba75 100644
--- a/pkg/docker/template.Dockerfile
+++ b/pkg/docker/template.Dockerfile
@@ -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)" \