Skip to content

Commit c66f8eb

Browse files
committed
Dockerfile git clones to be quiet and shallow
Signed-off-by: apostasie <[email protected]>
1 parent 39058fb commit c66f8eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ADD hack/git-checkout-tag-with-hash.sh /usr/local/bin/
7575
FROM build-base-debian AS build-containerd
7676
ARG TARGETARCH
7777
ARG 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
7979
WORKDIR /go/src/github.com/containerd/containerd
8080
RUN 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 && \
8686
FROM build-base-debian AS build-runc
8787
ARG RUNC_VERSION
8888
ARG 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
9090
WORKDIR /go/src/github.com/opencontainers/runc
9191
RUN 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 && \
9797
FROM build-base-debian AS build-bypass4netns
9898
ARG BYPASS4NETNS_VERSION
9999
ARG 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
101101
WORKDIR /go/src/github.com/rootless-containers/bypass4netns
102102
RUN git-checkout-tag-with-hash.sh ${BYPASS4NETNS_VERSION} && \
103103
mkdir -p /out/${TARGETARCH}
@@ -108,7 +108,7 @@ RUN GO=xx-go make static && \
108108
FROM build-base-debian AS build-kubo
109109
ARG KUBO_VERSION
110110
ARG 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
112112
WORKDIR /go/src/github.com/ipfs/kubo
113113
RUN 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
178178
ARG 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

Comments
 (0)