From fd636dc836c18c73e22ddc7fac64168e3103912b Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 10:26:15 +0300 Subject: [PATCH 1/8] build: migrate image to DHI --- Dockerfile-debian | 38 ++++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 0b39d6e56..39cd8fb8e 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -1,19 +1,19 @@ -FROM node:24.18.0-trixie-slim +FROM octopusdeploy/dhi-node:24-debian13-dev@sha256:1684b453b97f985c384af99f71507adf5727e24e76c6cd8c1a2da949ad8588e0 as build ARG TARGETPLATFORM -RUN apt update \ - && apt -y install \ - apt-transport-https \ - bash \ - busybox \ - ca-certificates \ - curl \ - git \ - && ln -s /bin/busybox /usr/bin/[[ \ - && curl -L "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-$(dpkg --print-architecture)" -o /usr/local/bin/jq \ - && chmod +x /usr/local/bin/jq -RUN npm upgrade -g npm -COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq -ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl +#RUN apt update \ +# && apt -y install \ +# apt-transport-https \ +# bash \ +# busybox \ +# ca-certificates \ +# curl \ +# git \ +# && ln -s /bin/busybox /usr/bin/[[ \ +# && curl -L "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-$(dpkg --print-architecture)" -o /usr/local/bin/jq \ +# && chmod +x /usr/local/bin/jq +#RUN npm upgrade -g npm +#COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq +#ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl WORKDIR /cf-cli COPY package.json yarn.lock check-version.js run-check-version.js /cf-cli/ RUN yarn install --prod --frozen-lockfile && \ @@ -22,9 +22,15 @@ COPY . /cf-cli RUN yarn generate-completion #purpose of security -RUN npm -g uninstall npm +#RUN npm -g uninstall npm +FROM octopusdeploy/dhi-node:24-debian_cf-cli-node-24-debian-13@sha256:91f550e9c617363429620203161cb44e7270efe125beb7b8b0dbb8b4f448a745 as base +WORKDIR /cf-cli +USER root +COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq +ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh +RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components # Node.js warnings must be suppressed to ensure that automations relying on exact output are not disrupted diff --git a/package.json b/package.json index 5f3c842d9..d7bfe993a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "1.2.5", + "version": "1.2.6", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true, From ca51f45b80c6c9c300674ac1233d7a44ced2836d Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 10:34:06 +0300 Subject: [PATCH 2/8] build: migrate image to DHI --- Dockerfile-debian | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 39cd8fb8e..3973a42d9 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -15,6 +15,7 @@ ARG TARGETPLATFORM #COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq #ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl WORKDIR /cf-cli +ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl COPY package.json yarn.lock check-version.js run-check-version.js /cf-cli/ RUN yarn install --prod --frozen-lockfile && \ yarn cache clean @@ -28,7 +29,7 @@ FROM octopusdeploy/dhi-node:24-debian_cf-cli-node-24-debian-13@sha256:91f550e9c6 WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq -ADD --chmod=775 https://dl.k8s.io/release/v1.36.1/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl +COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components From 4e62e84c9164d4f1af2148c083b9aa8a50728299 Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 10:42:09 +0300 Subject: [PATCH 3/8] build: migrate image to DHI --- Dockerfile-debian | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile-debian b/Dockerfile-debian index 3973a42d9..404fecbb8 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -30,6 +30,7 @@ WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl +COPY --chown=node:node --chmod=755 . . RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components From 39bf33bb20e5cd571564940cf27bd47cc4248a0b Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 13:35:14 +0300 Subject: [PATCH 4/8] build: migrate image to DHI --- Dockerfile-debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 404fecbb8..68d2a5a48 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -30,7 +30,7 @@ WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl -COPY --chown=node:node --chmod=755 . . +COPY --chown=node:node --chmod=755 /cf-cli /cf-cli RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components From a87a13127c1248fb3e859b3cad191a87608f6f9b Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 13:39:21 +0300 Subject: [PATCH 5/8] build: migrate image to DHI --- Dockerfile-debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 68d2a5a48..2cdb1866c 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -30,7 +30,7 @@ WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl -COPY --chown=node:node --chmod=755 /cf-cli /cf-cli +COPY --chown=node:node --chmod=755 --from=build . . RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components From 4fab8595a311b083f16ed24bff7bec2cdc0002fa Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 13:44:23 +0300 Subject: [PATCH 6/8] build: migrate image to DHI --- Dockerfile-debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 2cdb1866c..2eb5bb6ba 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -26,11 +26,11 @@ RUN yarn generate-completion #RUN npm -g uninstall npm FROM octopusdeploy/dhi-node:24-debian_cf-cli-node-24-debian-13@sha256:91f550e9c617363429620203161cb44e7270efe125beb7b8b0dbb8b4f448a745 as base +COPY --chmod=755 --from=build /cf-cli /cf-cli WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl -COPY --chown=node:node --chmod=755 --from=build . . RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components From c2d8ed067630d3294b38161e78d1dec1d3afd296 Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 14:40:51 +0300 Subject: [PATCH 7/8] build: migrate image to DHI --- Dockerfile-debian | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 2eb5bb6ba..51defd547 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -26,7 +26,8 @@ RUN yarn generate-completion #RUN npm -g uninstall npm FROM octopusdeploy/dhi-node:24-debian_cf-cli-node-24-debian-13@sha256:91f550e9c617363429620203161cb44e7270efe125beb7b8b0dbb8b4f448a745 as base -COPY --chmod=755 --from=build /cf-cli /cf-cli +#COPY --chmod=755 --from=build /cf-cli /cf-cli +COPY --chmod=755 --from=build . /cf-cli WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq From 0cf94aa5c2027366fa772566b26355e983ed13ac Mon Sep 17 00:00:00 2001 From: Vadim Kharin Date: Fri, 21 Aug 2026 14:49:53 +0300 Subject: [PATCH 8/8] build: migrate image to DHI --- Dockerfile-debian | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile-debian b/Dockerfile-debian index 51defd547..2364825f1 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -21,18 +21,19 @@ RUN yarn install --prod --frozen-lockfile && \ yarn cache clean COPY . /cf-cli RUN yarn generate-completion +RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh #purpose of security #RUN npm -g uninstall npm FROM octopusdeploy/dhi-node:24-debian_cf-cli-node-24-debian-13@sha256:91f550e9c617363429620203161cb44e7270efe125beb7b8b0dbb8b4f448a745 as base -#COPY --chmod=755 --from=build /cf-cli /cf-cli -COPY --chmod=755 --from=build . /cf-cli +COPY --chmod=755 --from=build /cf-cli /cf-cli +#COPY --chmod=755 --from=build . /cf-cli WORKDIR /cf-cli USER root COPY --from=mikefarah/yq:4.53.3 /usr/bin/yq /usr/local/bin/yq COPY --chmod=755 --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl -RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh +COPY --chmod=755 --from=build /usr/local/bin/codefresh /usr/local/bin/codefresh RUN ln -s /bin/busybox /usr/bin/[[ RUN codefresh components update --location components