From 43a6c97bcd24464fdb67a61d92eb07f55c0bb7d3 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 16 Oct 2023 14:34:01 +0800 Subject: [PATCH] Refine git clone commands in Dockerfiles (#76) Adjusted git clone commands in Dockerfiles to use `--depth=1`. This optimizes the cloning process by fetching a limited history, thereby saving resources and time. --- tests/containers/alpine.Dockerfile | 2 +- tests/containers/ubuntu.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/containers/alpine.Dockerfile b/tests/containers/alpine.Dockerfile index b7490cb..4ca6ee7 100644 --- a/tests/containers/alpine.Dockerfile +++ b/tests/containers/alpine.Dockerfile @@ -76,7 +76,7 @@ RUN apk add --no-cache \ "bats-core-bats-core-${commit}/install.sh" /usr/local && \ \ brew=2.2.13 && \ - git clone --branch ${brew} https://github.com/Homebrew/brew && \ + git clone --depth=1 --branch ${brew} https://github.com/Homebrew/brew && \ eval $(brew/bin/brew shellenv) && \ ln -s /brew/bin/brew /usr/local/bin/brew && \ brew --version && \ diff --git a/tests/containers/ubuntu.Dockerfile b/tests/containers/ubuntu.Dockerfile index cc293df..1c83928 100644 --- a/tests/containers/ubuntu.Dockerfile +++ b/tests/containers/ubuntu.Dockerfile @@ -77,7 +77,7 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install --no-inst "bats-core-bats-core-${commit}/install.sh" /usr/local && \ \ brew=2.2.13 && \ - git clone --branch ${brew} https://github.com/Homebrew/brew && \ + git clone --depth=1 --branch ${brew} https://github.com/Homebrew/brew && \ locale-gen en_US en_US.UTF-8 && \ eval $(brew/bin/brew shellenv) && \ ln -s /brew/bin/brew /usr/local/bin/brew && \