From 1c6c4e8cc682830adfc68ca565099c02c34a3cf0 Mon Sep 17 00:00:00 2001 From: Stefan Melmuk Date: Wed, 2 Nov 2022 22:08:43 +0100 Subject: [PATCH] make only a shallow clone --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ebb1d38..b9cdc1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,11 @@ USER node # Using https://github.com/bitwarden/clients/releases/tag/web-v2022.10.2 ARG VAULT_VERSION=703860f1ac7bad2dfa9a98640a568db26fdcf5ed -RUN git clone https://github.com/bitwarden/clients.git /vault WORKDIR /vault - -RUN git -c advice.detachedHead=false checkout "${VAULT_VERSION}" +RUN git init +RUN git remote add origin https://github.com/bitwarden/clients.git +RUN git fetch --depth 1 origin "${VAULT_VERSION}" +RUN git -c advice.detachedHead=false checkout FETCH_HEAD COPY --chown=node:node patches /patches COPY --chown=node:node scripts/apply_patches.sh /apply_patches.sh