From f64f0ded384c24c739bb045d370209694bafe1b9 Mon Sep 17 00:00:00 2001 From: Ruslan Gorbunov Date: Wed, 10 Jun 2026 06:17:49 +0300 Subject: [PATCH 1/3] [shell-operator] chore: use deckhouse base images for build and runtime Signed-off-by: Ruslan Gorbunov --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e175ea3..77739655 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -# Prebuilt jq. -FROM --platform=${TARGETPLATFORM:-linux/amd64} flant/jq:b6be13d5-musl AS libjq +# Prebuilt jq from deckhouse base images (v1.0.40). +FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:4b36dcf53c35b50e0afbc445232713aff15f788a61b832cd720bf9e88fc9fba8 AS libjq -# Go builder stage -FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.26.3-alpine3.23 AS builder +# Go builder stage (builder/golang-alpine, Go 1.26.4 on alpine 3.22). +FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:193e8ed6cd7fc19015ab615ccf92d0fe02471e66e3e5abf560b3a87fb05bdb62 AS builder ARG appVersion=latest @@ -32,8 +32,8 @@ RUN GOOS=linux \ -o shell-operator \ ./cmd/shell-operator -# Final runtime image -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.23 +# Final runtime image (builder/alpine 3.22 from deckhouse base images v1.0.40). +FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:8fa8cf713bf8cfc9038901e5b2fbc97d0403794d834dc4a619e9e81312a6feef ARG TARGETPLATFORM ARG kubectlVersion=v1.34.8 @@ -58,7 +58,7 @@ RUN mkdir /hooks # Copy necessary files ADD frameworks/shell /frameworks/shell ADD shell_lib.sh / -COPY --from=libjq /bin/jq /usr/bin +COPY --from=libjq /usr/bin/jq /usr/bin/jq COPY --from=builder /app/shell-operator / # Set working directory From 287d8edf0e82982d2dfd9f255c64f9a40c979eed Mon Sep 17 00:00:00 2001 From: Ruslan Gorbunov Date: Wed, 10 Jun 2026 06:46:02 +0300 Subject: [PATCH 2/3] [chore] fix: update docker builder and jq paths Signed-off-by: Ruslan Gorbunov --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77739655..f3372fb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Prebuilt jq from deckhouse base images (v1.0.40). FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:4b36dcf53c35b50e0afbc445232713aff15f788a61b832cd720bf9e88fc9fba8 AS libjq -# Go builder stage (builder/golang-alpine, Go 1.26.4 on alpine 3.22). -FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:193e8ed6cd7fc19015ab615ccf92d0fe02471e66e3e5abf560b3a87fb05bdb62 AS builder +# Go builder stage (builder/golang-alpine, Go 1.25 on alpine 3.22). +FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:9701f93cec25acec10837e2399f7fda7e4c23303bed6514bfa0ff692396f170b AS builder ARG appVersion=latest @@ -58,7 +58,7 @@ RUN mkdir /hooks # Copy necessary files ADD frameworks/shell /frameworks/shell ADD shell_lib.sh / -COPY --from=libjq /usr/bin/jq /usr/bin/jq +COPY --from=libjq /bin/jq /usr/bin COPY --from=builder /app/shell-operator / # Set working directory From 919e7da31bc99754633310cf7fa9c3192361cabc Mon Sep 17 00:00:00 2001 From: Ruslan Gorbunov Date: Wed, 10 Jun 2026 12:32:22 +0300 Subject: [PATCH 3/3] [chore] update go builder image to 1.26.4 Signed-off-by: Ruslan Gorbunov --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3372fb6..172fcfdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Prebuilt jq from deckhouse base images (v1.0.40). FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:4b36dcf53c35b50e0afbc445232713aff15f788a61b832cd720bf9e88fc9fba8 AS libjq -# Go builder stage (builder/golang-alpine, Go 1.25 on alpine 3.22). -FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:9701f93cec25acec10837e2399f7fda7e4c23303bed6514bfa0ff692396f170b AS builder +# Go builder stage (builder/golang-alpine, Go 1.26.4 on alpine 3.22). +FROM --platform=${TARGETPLATFORM:-linux/amd64} registry.deckhouse.io/container-factory@sha256:193e8ed6cd7fc19015ab615ccf92d0fe02471e66e3e5abf560b3a87fb05bdb62 AS builder ARG appVersion=latest