From 2073eb60d1b3f040d287dd0a10fffae5b06cb1eb Mon Sep 17 00:00:00 2001 From: kpango Date: Sun, 1 Sep 2024 13:28:55 +0900 Subject: [PATCH] fix Signed-off-by: kpango --- Makefile.d/docker.mk | 27 +++++++++++++++++++ dockers/agent/core/agent/Dockerfile | 6 ++--- dockers/agent/core/faiss/Dockerfile | 6 ++--- dockers/agent/core/ngt/Dockerfile | 6 ++--- dockers/agent/sidecar/Dockerfile | 6 ++--- dockers/binfmt/Dockerfile | 2 +- dockers/buildbase/Dockerfile | 2 +- dockers/buildkit/Dockerfile | 2 +- dockers/buildkit/syft/scanner/Dockerfile | 2 +- dockers/ci/base/Dockerfile | 8 +++--- dockers/dev/Dockerfile | 8 +++--- dockers/discoverer/k8s/Dockerfile | 6 ++--- dockers/gateway/filter/Dockerfile | 6 ++--- dockers/gateway/lb/Dockerfile | 6 ++--- dockers/gateway/mirror/Dockerfile | 6 ++--- dockers/index/job/correction/Dockerfile | 6 ++--- dockers/index/job/creation/Dockerfile | 6 ++--- .../index/job/readreplica/rotate/Dockerfile | 6 ++--- dockers/index/job/save/Dockerfile | 6 ++--- dockers/index/operator/Dockerfile | 6 ++--- dockers/manager/index/Dockerfile | 6 ++--- dockers/operator/helm/Dockerfile | 6 ++--- dockers/tools/benchmark/job/Dockerfile | 6 ++--- dockers/tools/benchmark/operator/Dockerfile | 6 ++--- dockers/tools/cli/loadtest/Dockerfile | 6 ++--- hack/docker/gen/main.go | 4 +-- 26 files changed, 95 insertions(+), 68 deletions(-) diff --git a/Makefile.d/docker.mk b/Makefile.d/docker.mk index 858bd69e728..d68f90e5d3d 100644 --- a/Makefile.d/docker.mk +++ b/Makefile.d/docker.mk @@ -41,6 +41,33 @@ docker/build: \ docker/build/operator/helm \ docker/build/readreplica-rotate +docker/xpanes/build: + @xpanes -s -c "make -f $(ROOTDIR)/Makefile {}" \ + docker/build/agent \ + docker/build/agent-faiss \ + docker/build/agent-ngt \ + docker/build/agent-sidecar \ + docker/build/benchmark-job \ + docker/build/benchmark-operator \ + docker/build/binfmt \ + docker/build/buildbase \ + docker/build/buildkit \ + docker/build/buildkit-syft-scanner \ + docker/build/ci-container \ + docker/build/dev-container \ + docker/build/discoverer-k8s \ + docker/build/gateway-filter \ + docker/build/gateway-lb \ + docker/build/gateway-mirror \ + docker/build/index-correction \ + docker/build/index-creation \ + docker/build/index-operator \ + docker/build/index-save \ + docker/build/loadtest \ + docker/build/manager-index \ + docker/build/operator/helm \ + docker/build/readreplica-rotate + .PHONY: docker/name/org docker/name/org: @echo "$(ORG)" diff --git a/dockers/agent/core/agent/Dockerfile b/dockers/agent/core/agent/Dockerfile index a39fe071998..57c98ca1d90 100644 --- a/dockers/agent/core/agent/Dockerfile +++ b/dockers/agent/core/agent/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ set -ex \ && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ @@ -92,4 +92,4 @@ LABEL maintainer="vdaas.org vald team " COPY --from=builder /usr/bin/agent /usr/bin/agent # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/agent"] +ENTRYPOINT ["/usr/bin/agent"] \ No newline at end of file diff --git a/dockers/agent/core/faiss/Dockerfile b/dockers/agent/core/faiss/Dockerfile index 08a461dfc86..9e4860847c9 100644 --- a/dockers/agent/core/faiss/Dockerfile +++ b/dockers/agent/core/faiss/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -95,4 +95,4 @@ COPY --from=builder /usr/bin/faiss /usr/bin/faiss COPY cmd/agent/core/faiss/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/faiss"] +ENTRYPOINT ["/usr/bin/faiss"] \ No newline at end of file diff --git a/dockers/agent/core/ngt/Dockerfile b/dockers/agent/core/ngt/Dockerfile index a7976a16bf8..971e3adc514 100644 --- a/dockers/agent/core/ngt/Dockerfile +++ b/dockers/agent/core/ngt/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -94,4 +94,4 @@ COPY --from=builder /usr/bin/ngt /usr/bin/ngt COPY cmd/agent/core/ngt/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/ngt"] +ENTRYPOINT ["/usr/bin/ngt"] \ No newline at end of file diff --git a/dockers/agent/sidecar/Dockerfile b/dockers/agent/sidecar/Dockerfile index baf1f9cfe6a..5c19e85c8ed 100644 --- a/dockers/agent/sidecar/Dockerfile +++ b/dockers/agent/sidecar/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -84,4 +84,4 @@ LABEL maintainer="vdaas.org vald team " COPY --from=builder /usr/bin/sidecar /usr/bin/sidecar # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/sidecar"] +ENTRYPOINT ["/usr/bin/sidecar"] \ No newline at end of file diff --git a/dockers/binfmt/Dockerfile b/dockers/binfmt/Dockerfile index f2d73909bdc..47284d17e2c 100644 --- a/dockers/binfmt/Dockerfile +++ b/dockers/binfmt/Dockerfile @@ -16,4 +16,4 @@ # # DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go -FROM tonistiigi/binfmt:master AS builder +FROM tonistiigi/binfmt:master AS builder \ No newline at end of file diff --git a/dockers/buildbase/Dockerfile b/dockers/buildbase/Dockerfile index 301a31e0103..6457b014578 100644 --- a/dockers/buildbase/Dockerfile +++ b/dockers/buildbase/Dockerfile @@ -16,4 +16,4 @@ # # DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go -FROM ubuntu:devel AS builder +FROM ubuntu:devel AS builder \ No newline at end of file diff --git a/dockers/buildkit/Dockerfile b/dockers/buildkit/Dockerfile index 99c71c61e23..9dd722ea255 100644 --- a/dockers/buildkit/Dockerfile +++ b/dockers/buildkit/Dockerfile @@ -16,4 +16,4 @@ # # DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go -FROM moby/buildkit:master AS builder +FROM moby/buildkit:master AS builder \ No newline at end of file diff --git a/dockers/buildkit/syft/scanner/Dockerfile b/dockers/buildkit/syft/scanner/Dockerfile index 4a23207c47f..df32fe57052 100644 --- a/dockers/buildkit/syft/scanner/Dockerfile +++ b/dockers/buildkit/syft/scanner/Dockerfile @@ -16,4 +16,4 @@ # # DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go -FROM docker/buildkit-syft-scanner:edge AS scanner +FROM docker/buildkit-syft-scanner:edge AS scanner \ No newline at end of file diff --git a/dockers/ci/base/Dockerfile b/dockers/ci/base/Dockerfile index d79d6d0008a..6feb87cebd2 100644 --- a/dockers/ci/base/Dockerfile +++ b/dockers/ci/base/Dockerfile @@ -44,16 +44,16 @@ ENV REPO=vald ENV RUST_HOME=/usr/local/lib/rust ENV TZ=Etc/UTC ENV USER=root -ENV CARGO_HOME=${RUST_HOME}/cargo ENV RUSTUP_HOME=${RUST_HOME}/rustup +ENV CARGO_HOME=${RUST_HOME}/cargo ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH} WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -124,4 +124,4 @@ RUN --mount=type=bind,target=.,rw \ && rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/* # skipcq: DOK-DL3002 USER root:root -ENTRYPOINT ["/bin/bash"] +ENTRYPOINT ["/bin/bash"] \ No newline at end of file diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index d83a197a00d..d064facaea9 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -44,16 +44,16 @@ ENV REPO=vald ENV RUST_HOME=/usr/local/lib/rust ENV TZ=Etc/UTC ENV USER=root -ENV RUSTUP_HOME=${RUST_HOME}/rustup ENV CARGO_HOME=${RUST_HOME}/cargo +ENV RUSTUP_HOME=${RUST_HOME}/rustup ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH} WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -143,4 +143,4 @@ RUN --mount=type=bind,target=.,rw \ && make faiss/install \ && rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/* # skipcq: DOK-DL3002 -USER root:root +USER root:root \ No newline at end of file diff --git a/dockers/discoverer/k8s/Dockerfile b/dockers/discoverer/k8s/Dockerfile index 9b9858c2e91..84302fe9f62 100644 --- a/dockers/discoverer/k8s/Dockerfile +++ b/dockers/discoverer/k8s/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/discoverer /usr/bin/discoverer COPY cmd/discoverer/k8s/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/discoverer"] +ENTRYPOINT ["/usr/bin/discoverer"] \ No newline at end of file diff --git a/dockers/gateway/filter/Dockerfile b/dockers/gateway/filter/Dockerfile index 42a7298d95c..c4b3c751aae 100644 --- a/dockers/gateway/filter/Dockerfile +++ b/dockers/gateway/filter/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/filter /usr/bin/filter COPY cmd/gateway/filter/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/filter"] +ENTRYPOINT ["/usr/bin/filter"] \ No newline at end of file diff --git a/dockers/gateway/lb/Dockerfile b/dockers/gateway/lb/Dockerfile index da3eb7c0ef5..8d666ebfa43 100644 --- a/dockers/gateway/lb/Dockerfile +++ b/dockers/gateway/lb/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/lb /usr/bin/lb COPY cmd/gateway/lb/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/lb"] +ENTRYPOINT ["/usr/bin/lb"] \ No newline at end of file diff --git a/dockers/gateway/mirror/Dockerfile b/dockers/gateway/mirror/Dockerfile index c61d6927918..eb136bd4acd 100644 --- a/dockers/gateway/mirror/Dockerfile +++ b/dockers/gateway/mirror/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/mirror /usr/bin/mirror COPY cmd/gateway/mirror/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/mirror"] +ENTRYPOINT ["/usr/bin/mirror"] \ No newline at end of file diff --git a/dockers/index/job/correction/Dockerfile b/dockers/index/job/correction/Dockerfile index f54b1cde590..96152e486e4 100644 --- a/dockers/index/job/correction/Dockerfile +++ b/dockers/index/job/correction/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-correction /usr/bin/index-correction COPY cmd/index/job/correction/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index-correction"] +ENTRYPOINT ["/usr/bin/index-correction"] \ No newline at end of file diff --git a/dockers/index/job/creation/Dockerfile b/dockers/index/job/creation/Dockerfile index b516ce5b954..3d89245d180 100644 --- a/dockers/index/job/creation/Dockerfile +++ b/dockers/index/job/creation/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-creation /usr/bin/index-creation COPY cmd/index/job/creation/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index-creation"] +ENTRYPOINT ["/usr/bin/index-creation"] \ No newline at end of file diff --git a/dockers/index/job/readreplica/rotate/Dockerfile b/dockers/index/job/readreplica/rotate/Dockerfile index 41c3b05ea13..2c5f7cfba93 100644 --- a/dockers/index/job/readreplica/rotate/Dockerfile +++ b/dockers/index/job/readreplica/rotate/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/readreplica-rotate /usr/bin/readreplica-rotate COPY cmd/index/job/readreplica/rotate/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/readreplica-rotate"] +ENTRYPOINT ["/usr/bin/readreplica-rotate"] \ No newline at end of file diff --git a/dockers/index/job/save/Dockerfile b/dockers/index/job/save/Dockerfile index a23c95c80d7..5c4b9ccc45f 100644 --- a/dockers/index/job/save/Dockerfile +++ b/dockers/index/job/save/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-save /usr/bin/index-save COPY cmd/index/job/save/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index-save"] +ENTRYPOINT ["/usr/bin/index-save"] \ No newline at end of file diff --git a/dockers/index/operator/Dockerfile b/dockers/index/operator/Dockerfile index bfbf1dc0fbc..fa713abbd1a 100644 --- a/dockers/index/operator/Dockerfile +++ b/dockers/index/operator/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-operator /usr/bin/index-operator COPY cmd/index/operator/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index-operator"] +ENTRYPOINT ["/usr/bin/index-operator"] \ No newline at end of file diff --git a/dockers/manager/index/Dockerfile b/dockers/manager/index/Dockerfile index 0a988a7dd47..5fe2b80e92b 100644 --- a/dockers/manager/index/Dockerfile +++ b/dockers/manager/index/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index /usr/bin/index COPY cmd/manager/index/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index"] +ENTRYPOINT ["/usr/bin/index"] \ No newline at end of file diff --git a/dockers/operator/helm/Dockerfile b/dockers/operator/helm/Dockerfile index e7af9b3a42f..5e06bc5f310 100644 --- a/dockers/operator/helm/Dockerfile +++ b/dockers/operator/helm/Dockerfile @@ -51,8 +51,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -106,4 +106,4 @@ COPY --from=builder /opt/helm/charts/vald /opt/helm/charts/vald COPY --from=builder /opt/helm/charts/vald-helm-operator /opt/helm/charts/vald-helm-operator # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/helm-operator", "run", "--watches-file=/opt/helm/watches.yaml"] +ENTRYPOINT ["/usr/bin/helm-operator", "run", "--watches-file=/opt/helm/watches.yaml"] \ No newline at end of file diff --git a/dockers/tools/benchmark/job/Dockerfile b/dockers/tools/benchmark/job/Dockerfile index 9a70e589349..a2faa94d885 100644 --- a/dockers/tools/benchmark/job/Dockerfile +++ b/dockers/tools/benchmark/job/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -93,4 +93,4 @@ COPY --from=builder /usr/bin/job /usr/bin/job COPY cmd/tools/benchmark/job/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/job"] +ENTRYPOINT ["/usr/bin/job"] \ No newline at end of file diff --git a/dockers/tools/benchmark/operator/Dockerfile b/dockers/tools/benchmark/operator/Dockerfile index c08d03f6ca9..580eca69f1e 100644 --- a/dockers/tools/benchmark/operator/Dockerfile +++ b/dockers/tools/benchmark/operator/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/operator /usr/bin/operator COPY cmd/tools/benchmark/operator/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/operator"] +ENTRYPOINT ["/usr/bin/operator"] \ No newline at end of file diff --git a/dockers/tools/cli/loadtest/Dockerfile b/dockers/tools/cli/loadtest/Dockerfile index 0f68be106e6..ea9d0216799 100644 --- a/dockers/tools/cli/loadtest/Dockerfile +++ b/dockers/tools/cli/loadtest/Dockerfile @@ -47,8 +47,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] #skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 RUN --mount=type=bind,target=.,rw \ --mount=type=tmpfs,target=/tmp \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME} \ + --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME} \ --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ --mount=type=tmpfs,target="${GOPATH}/src" \ @@ -93,4 +93,4 @@ COPY --from=builder /usr/bin/loadtest /usr/bin/loadtest COPY cmd/tools/cli/loadtest/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/loadtest"] +ENTRYPOINT ["/usr/bin/loadtest"] \ No newline at end of file diff --git a/hack/docker/gen/main.go b/hack/docker/gen/main.go index ef561014810..a9fab957cd5 100644 --- a/hack/docker/gen/main.go +++ b/hack/docker/gen/main.go @@ -326,8 +326,8 @@ var ( defaultMounts = []string{ "--mount=type=bind,target=.,rw", "--mount=type=tmpfs,target=/tmp", - "--mount=type=cache,target=/var/lib/apt,sharing=locked", - "--mount=type=cache,target=/var/cache/apt,sharing=locked", + "--mount=type=cache,target=/var/lib/apt,sharing=locked,id=${APP_NAME}", + "--mount=type=cache,target=/var/cache/apt,sharing=locked,id=${APP_NAME}", } goDefaultMounts = []string{ "--mount=type=cache,target=\"${GOPATH}/pkg\",id=\"go-build-${TARGETARCH}\"",