From bd0abdf0838f3dd8952825332fb7631d85f51a34 Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Mon, 19 Feb 2024 12:59:22 +0000 Subject: 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. --- pkg/docker/Dockerfile.go1.20 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/docker/Dockerfile.go1.20') diff --git a/pkg/docker/Dockerfile.go1.20 b/pkg/docker/Dockerfile.go1.20 index fcb449a7..a390b2f6 100644 --- a/pkg/docker/Dockerfile.go1.20 +++ b/pkg/docker/Dockerfile.go1.20 @@ -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)" \ -- cgit