From 929dd317b0ef17d954395132f099f63e620299bb Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:07:42 +0100 Subject: [PATCH] locked is better --- packages/service-integration/Dockerfile | 4 ++-- requirements/tools/Dockerfile | 2 +- services/agent/Dockerfile | 4 ++-- services/api-server/Dockerfile | 4 ++-- services/autoscaling/Dockerfile | 4 ++-- services/catalog/Dockerfile | 4 ++-- services/clusters-keeper/Dockerfile | 4 ++-- services/dask-sidecar/Dockerfile | 4 ++-- services/datcore-adapter/Dockerfile | 4 ++-- services/director-v2/Dockerfile | 4 ++-- services/director/Dockerfile | 4 ++-- services/dynamic-scheduler/Dockerfile | 4 ++-- services/dynamic-sidecar/Dockerfile | 2 +- services/efs-guardian/Dockerfile | 4 ++-- services/invitations/Dockerfile | 4 ++-- services/migration/Dockerfile | 2 +- services/payments/Dockerfile | 4 ++-- services/resource-usage-tracker/Dockerfile | 4 ++-- services/storage/Dockerfile | 4 ++-- services/web/Dockerfile | 4 ++-- 20 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/service-integration/Dockerfile b/packages/service-integration/Dockerfile index 434ecb94763..b241266b94c 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 461d4b310c0..d1fd7bc2eff 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 edf0e8ac19d..28cfb186a5a 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 e7d207dbf6b..d22ef03864d 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 3389fcee134..cd37bbb4c4b 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 c19e840ead0..bb11acd3fd1 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 207da3eb811..97a1469340d 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 fa053e6d16e..e69ecc351cf 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 40e2ca12998..d28bb4afbbe 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 0dcaf251bcb..3815f84cd83 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 c9080f0c6b7..65c3ddcd050 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 a631d8a51df..6b6a68b2402 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 5325171e7dd..4267f85b33c 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 a92ac0d2842..b0926b7cceb 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 6a1f727c86e..74bdaec8a77 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 b7664c39b1f..b91b73901f3 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 df7098e6aeb..975927c8d1a 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 290b8ad7671..5abb555bbaf 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 d03072cf6d0..4a3cdc24143 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 dd9d96f55d4..8cc173a67ee 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 \