@@ -75,7 +75,7 @@ ADD hack/git-checkout-tag-with-hash.sh /usr/local/bin/
7575FROM build-base-debian AS build-containerd
7676ARG TARGETARCH
7777ARG CONTAINERD_VERSION
78- RUN git clone https://github.com/containerd/containerd.git /go/src/github.com/containerd/containerd
78+ RUN git clone --quiet --depth 1 --branch "${CONTAINERD_VERSION%@*}" https://github.com/containerd/containerd.git /go/src/github.com/containerd/containerd
7979WORKDIR /go/src/github.com/containerd/containerd
8080RUN git-checkout-tag-with-hash.sh ${CONTAINERD_VERSION} && \
8181 mkdir -p /out /out/$TARGETARCH && \
@@ -86,7 +86,7 @@ RUN GO=xx-go make STATIC=1 && \
8686FROM build-base-debian AS build-runc
8787ARG RUNC_VERSION
8888ARG TARGETARCH
89- RUN git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
89+ RUN git clone --quiet --depth 1 --branch "${RUNC_VERSION%@*}" https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
9090WORKDIR /go/src/github.com/opencontainers/runc
9191RUN git-checkout-tag-with-hash.sh ${RUNC_VERSION} && \
9292 mkdir -p /out
@@ -97,7 +97,7 @@ RUN GO=xx-go CC=$(xx-info)-gcc STRIP=$(xx-info)-strip make static && \
9797FROM build-base-debian AS build-bypass4netns
9898ARG BYPASS4NETNS_VERSION
9999ARG TARGETARCH
100- RUN git clone https://github.com/rootless-containers/bypass4netns.git /go/src/github.com/rootless-containers/bypass4netns
100+ RUN git clone --quiet --depth 1 --branch "${BYPASS4NETNS_VERSION%@*}" https://github.com/rootless-containers/bypass4netns.git /go/src/github.com/rootless-containers/bypass4netns
101101WORKDIR /go/src/github.com/rootless-containers/bypass4netns
102102RUN git-checkout-tag-with-hash.sh ${BYPASS4NETNS_VERSION} && \
103103 mkdir -p /out/${TARGETARCH}
@@ -108,7 +108,7 @@ RUN GO=xx-go make static && \
108108FROM build-base-debian AS build-kubo
109109ARG KUBO_VERSION
110110ARG TARGETARCH
111- RUN git clone https://github.com/ipfs/kubo.git /go/src/github.com/ipfs/kubo
111+ RUN git clone --quiet --depth 1 --branch "${KUBO_VERSION%@*}" https://github.com/ipfs/kubo.git /go/src/github.com/ipfs/kubo
112112WORKDIR /go/src/github.com/ipfs/kubo
113113RUN git-checkout-tag-with-hash.sh ${KUBO_VERSION} && \
114114 mkdir -p /out/${TARGETARCH}
@@ -176,7 +176,7 @@ RUN STARGZ_SNAPSHOTTER_VERSION=${STARGZ_SNAPSHOTTER_VERSION/@BINARY}; \
176176 mv stargz-snapshotter.service /out/lib/systemd/system/stargz-snapshotter.service && \
177177 echo "- Stargz Snapshotter: ${STARGZ_SNAPSHOTTER_VERSION}" >> /out/share/doc/nerdctl-full/README.md
178178ARG IMGCRYPT_VERSION
179- RUN git clone https://github.com/containerd/imgcrypt.git /go/src/github.com/containerd/imgcrypt && \
179+ RUN git clone --quiet --depth 1 --branch "${IMGCRYPT_VERSION%@*}" https://github.com/containerd/imgcrypt.git /go/src/github.com/containerd/imgcrypt && \
180180 cd /go/src/github.com/containerd/imgcrypt && \
181181 git-checkout-tag-with-hash.sh "${IMGCRYPT_VERSION}" && \
182182 CGO_ENABLED=0 make && DESTDIR=/out make install && \
0 commit comments