Skip to content

Commit 8df507e

Browse files
committed
fix: avoid Dockerfile ADD and use RUN git clone instead
1 parent e266a4e commit 8df507e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

containers/debian/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,20 @@ EOF
256256
ENV KEY4HEPSPACK_ROOT=${SPACKPACKAGES_ROOT}/repos/key4hep-spack
257257
ARG KEY4HEPSPACK_ORGREPO="key4hep/key4hep-spack"
258258
ARG KEY4HEPSPACK_VERSION="main"
259-
ADD https://github.com/${KEY4HEPSPACK_ORGREPO}.git#${KEY4HEPSPACK_VERSION} ${KEY4HEPSPACK_ROOT}
260-
RUN spack repo add --scope site "${KEY4HEPSPACK_ROOT}"
259+
RUN <<EOF
260+
set -e
261+
git clone --filter=tree:0 https://github.com/${KEY4HEPSPACK_ORGREPO}.git ${KEY4HEPSPACK_ROOT}
262+
git -C ${KEY4HEPSPACK_ROOT} checkout ${KEY4HEPSPACK_VERSION}
263+
spack repo add --scope site "${KEY4HEPSPACK_ROOT}"
264+
EOF
261265

262266
## Setup eic-spack (no need for cherry-picks)
263267
ENV EICSPACK_ROOT=${SPACKPACKAGES_ROOT}/repos/eic-spack
264268
ARG EICSPACK_ORGREPO="eic/eic-spack"
265269
ARG EICSPACK_VERSION="develop"
266-
ADD https://github.com/${EICSPACK_ORGREPO}.git#${EICSPACK_VERSION} ${EICSPACK_ROOT}
267-
RUN spack repo add --scope site "${EICSPACK_ROOT}"
270+
RUN <<EOF
271+
set -e
272+
git clone --filter=tree:0 https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT}
273+
git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION}
274+
spack repo add --scope site "${EICSPACK_ROOT}"
275+
EOF

0 commit comments

Comments
 (0)