From 460555ca81c52652e6b587308d48f01a11676907 Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Wed, 6 Aug 2025 11:39:42 +0200 Subject: [PATCH 1/3] Add BTP CLI to Dockerfile --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 827708d..462bcda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/SAP/devops-docker-cf-cl LABEL org.opencontainers.image.description="An image for the cf cli" LABEL org.opencontainers.image.licenses=Apache-2.0 -ENV VERSION 0.1 +ENV VERSION=0.1 # https://github.com/hadolint/hadolint/wiki/DL4006 SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -19,10 +19,14 @@ RUN apt-get update && \ # add group & user ARG USER_HOME=/home/piper RUN addgroup -gid 1000 piper && \ - useradd piper --uid 1000 --gid 1000 --shell /bin/bash --home-dir "${USER_HOME}" --create-home && \ - curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C /usr/local/bin && \ + useradd piper --uid 1000 --gid 1000 --shell /bin/bash --home-dir "${USER_HOME}" --create-home + +RUN curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C /usr/local/bin && \ cf --version +RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash && \ + btp --version + USER piper WORKDIR ${USER_HOME} From 5133cd443f44c67563c2ac4294ecceaf5d6b95a8 Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Wed, 6 Aug 2025 14:48:14 +0200 Subject: [PATCH 2/3] Fixed installtion path and set version to latest --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 462bcda..b789407 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN addgroup -gid 1000 piper && \ RUN curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C /usr/local/bin && \ cf --version -RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash && \ +RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash -s -- -o /usr/local/bin -v latest && \ btp --version USER piper From 4b56037a990684dbf66f6d831fb1a50231b5bd2b Mon Sep 17 00:00:00 2001 From: DanielMieg Date: Wed, 6 Aug 2025 15:50:40 +0200 Subject: [PATCH 3/3] added INSTALL_DIR as ARG --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b789407..e8aff7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,10 +21,11 @@ ARG USER_HOME=/home/piper RUN addgroup -gid 1000 piper && \ useradd piper --uid 1000 --gid 1000 --shell /bin/bash --home-dir "${USER_HOME}" --create-home -RUN curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C /usr/local/bin && \ +ARG INSTALL_DIR=/usr/local/bin +RUN curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C "${INSTALL_DIR}" && \ cf --version -RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash -s -- -o /usr/local/bin -v latest && \ +RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash -s -- -o "${INSTALL_DIR}" -v latest && \ btp --version USER piper