Skip to content

Commit 062c789

Browse files
authored
Add BTP CLI (#76)
* Add BTP CLI to Dockerfile * Fixed installtion path and set version to latest * added INSTALL_DIR as ARG
1 parent 61accbf commit 062c789

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/SAP/devops-docker-cf-cl
44
LABEL org.opencontainers.image.description="An image for the cf cli"
55
LABEL org.opencontainers.image.licenses=Apache-2.0
66

7-
ENV VERSION 0.1
7+
ENV VERSION=0.1
88

99
# https://github.com/hadolint/hadolint/wiki/DL4006
1010
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -19,10 +19,15 @@ RUN apt-get update && \
1919
# add group & user
2020
ARG USER_HOME=/home/piper
2121
RUN addgroup -gid 1000 piper && \
22-
useradd piper --uid 1000 --gid 1000 --shell /bin/bash --home-dir "${USER_HOME}" --create-home && \
23-
curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C /usr/local/bin && \
22+
useradd piper --uid 1000 --gid 1000 --shell /bin/bash --home-dir "${USER_HOME}" --create-home
23+
24+
ARG INSTALL_DIR=/usr/local/bin
25+
RUN curl --location --silent "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx -C "${INSTALL_DIR}" && \
2426
cf --version
2527

28+
RUN curl https://cli.btp.cloud.sap/btpcli-install.sh | bash -s -- -o "${INSTALL_DIR}" -v latest && \
29+
btp --version
30+
2631
USER piper
2732
WORKDIR ${USER_HOME}
2833

0 commit comments

Comments
 (0)