diff --git a/packages/service-integration/Dockerfile b/packages/service-integration/Dockerfile index 434ecb947637..b241266b94cf 100644 --- a/packages/service-integration/Dockerfile +++ b/packages/service-integration/Dockerfile @@ -12,7 +12,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -53,7 +53,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" FROM base AS build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/requirements/tools/Dockerfile b/requirements/tools/Dockerfile index 461d4b310c0f..d1fd7bc2eff6 100644 --- a/requirements/tools/Dockerfile +++ b/requirements/tools/Dockerfile @@ -16,7 +16,7 @@ FROM python:${PYTHON_VERSION}-slim-bookworm AS base ENV VIRTUAL_ENV=/home/scu/.venv -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update \ && apt-get -y install --no-install-recommends\ diff --git a/services/agent/Dockerfile b/services/agent/Dockerfile index edf0e8ac19d4..28cfb186a5a5 100644 --- a/services/agent/Dockerfile +++ b/services/agent/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=GitHK # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -70,7 +70,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/api-server/Dockerfile b/services/api-server/Dockerfile index e7d207dbf6b9..d22ef03864df 100644 --- a/services/api-server/Dockerfile +++ b/services/api-server/Dockerfile @@ -19,7 +19,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -67,7 +67,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/autoscaling/Dockerfile b/services/autoscaling/Dockerfile index 3389fcee1340..cd37bbb4c4b9 100644 --- a/services/autoscaling/Dockerfile +++ b/services/autoscaling/Dockerfile @@ -23,7 +23,7 @@ ENV DOCKER_APT_VERSION="5:26.1.4-1~debian.12~bookworm" # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ @@ -86,7 +86,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/catalog/Dockerfile b/services/catalog/Dockerfile index c19e840ead09..bb11acd3fd14 100644 --- a/services/catalog/Dockerfile +++ b/services/catalog/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -68,7 +68,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/clusters-keeper/Dockerfile b/services/clusters-keeper/Dockerfile index 207da3eb8119..97a1469340d5 100644 --- a/services/clusters-keeper/Dockerfile +++ b/services/clusters-keeper/Dockerfile @@ -23,7 +23,7 @@ ENV DOCKER_APT_VERSION="5:26.1.4-1~debian.12~bookworm" # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ @@ -86,7 +86,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/dask-sidecar/Dockerfile b/services/dask-sidecar/Dockerfile index fa053e6d16ec..e69ecc351cff 100644 --- a/services/dask-sidecar/Dockerfile +++ b/services/dask-sidecar/Dockerfile @@ -22,7 +22,7 @@ LABEL maintainer=sanderegg # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -78,7 +78,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/datcore-adapter/Dockerfile b/services/datcore-adapter/Dockerfile index 40e2ca12998f..d28bb4afbbee 100644 --- a/services/datcore-adapter/Dockerfile +++ b/services/datcore-adapter/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=sanderegg # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -68,7 +68,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/director-v2/Dockerfile b/services/director-v2/Dockerfile index 0dcaf251bcb8..3815f84cd830 100644 --- a/services/director-v2/Dockerfile +++ b/services/director-v2/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -68,7 +68,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/director/Dockerfile b/services/director/Dockerfile index c9080f0c6b7c..65c3ddcd0503 100644 --- a/services/director/Dockerfile +++ b/services/director/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=sanderegg # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -68,7 +68,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/dynamic-scheduler/Dockerfile b/services/dynamic-scheduler/Dockerfile index a631d8a51df2..6b6a68b2402d 100644 --- a/services/dynamic-scheduler/Dockerfile +++ b/services/dynamic-scheduler/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -67,7 +67,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/dynamic-sidecar/Dockerfile b/services/dynamic-sidecar/Dockerfile index 5325171e7dde..4267f85b33c7 100644 --- a/services/dynamic-sidecar/Dockerfile +++ b/services/dynamic-sidecar/Dockerfile @@ -108,7 +108,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/efs-guardian/Dockerfile b/services/efs-guardian/Dockerfile index a92ac0d28427..b0926b7cceb0 100644 --- a/services/efs-guardian/Dockerfile +++ b/services/efs-guardian/Dockerfile @@ -23,7 +23,7 @@ ENV DOCKER_APT_VERSION="5:26.1.4-1~debian.12~bookworm" # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ @@ -104,7 +104,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/invitations/Dockerfile b/services/invitations/Dockerfile index 6a1f727c86ea..74bdaec8a77e 100644 --- a/services/invitations/Dockerfile +++ b/services/invitations/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -67,7 +67,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/migration/Dockerfile b/services/migration/Dockerfile index b7664c39b1fa..b91b73901f35 100644 --- a/services/migration/Dockerfile +++ b/services/migration/Dockerfile @@ -40,7 +40,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" # -------------------------------------------- FROM base AS build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/payments/Dockerfile b/services/payments/Dockerfile index df7098e6aebe..975927c8d1a6 100644 --- a/services/payments/Dockerfile +++ b/services/payments/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -67,7 +67,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/resource-usage-tracker/Dockerfile b/services/resource-usage-tracker/Dockerfile index 290b8ad76718..5abb555bbaf3 100644 --- a/services/resource-usage-tracker/Dockerfile +++ b/services/resource-usage-tracker/Dockerfile @@ -20,7 +20,7 @@ LABEL maintainer=sanderegg # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -68,7 +68,7 @@ FROM base AS build ENV SC_BUILD_TARGET=build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/storage/Dockerfile b/services/storage/Dockerfile index d03072cf6d04..4a3cdc241439 100644 --- a/services/storage/Dockerfile +++ b/services/storage/Dockerfile @@ -19,7 +19,7 @@ LABEL maintainer=mguidon # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -75,7 +75,7 @@ FROM base AS build ENV SC_BUILD_TARGET build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/services/web/Dockerfile b/services/web/Dockerfile index dd9d96f55d49..8cc173a67ee7 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -21,7 +21,7 @@ LABEL maintainer=pcrespov # for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/] RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux && \ apt-get update && \ apt-get install -y --no-install-recommends \ @@ -78,7 +78,7 @@ FROM base AS build ENV SC_BUILD_TARGET build -RUN --mount=type=cache,target=/var/cache/apt \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \