diff --git a/Dockerfile b/Dockerfile index 1d5e612..8b83490 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ USER 0 ENV INITIAL_CONFIG=/tmp/initial_config ENV WRAPPER_BINARIES=/wto/bin ENV DOWNLOADED_BINARIES=/wto/bin/downloaded +ENV CLAUDE_BINARIES=/opt/claude/bin +ENV GCLOUD_BINARIES=/opt/google-cloud-sdk/bin ENV HOME=/home/user WORKDIR /home/user @@ -23,7 +25,27 @@ RUN mkdir -p /home/user $INITIAL_CONFIG $WRAPPER_BINARIES $DOWNLOADED_BINARIES & vi vim nano \ # developer tools tar git procps jq && \ - microdnf -y clean all + microdnf -y clean all && \ + # claude code (might not be available for all platforms) + curl -fsSL https://claude.ai/install.sh | bash && \ + mkdir -p ${CLAUDE_BINARIES} && \ + mv /home/user/.local/bin/claude ${CLAUDE_BINARIES} && \ + # Install Google Cloud SDK based on platform architecture + ARCH=$(uname -m) && \ + if [ "$ARCH" = "x86_64" ]; then \ + GCLOUD_ARCH="x86_64"; \ + elif [ "$ARCH" = "aarch64" ]; then \ + GCLOUD_ARCH="arm"; \ + else \ + echo "Unsupported architecture: $ARCH" && exit 1; \ + fi && \ + curl -sSL "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz" -o /tmp/google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ + cd /tmp && tar -xzf google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ + ./google-cloud-sdk/install.sh --quiet --usage-reporting false --command-completion false --path-update false && \ + mv google-cloud-sdk /opt && \ + rm google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz + +ENV PATH="${WRAPPER_BINARIES}:${DOWNLOADED_BINARIES}:${CLAUDE_BINARIES}:${GCLOUD_BINARIES}:${PATH}" COPY container-root-x86_64.tgz /tmp/container-root-x86_64.tgz @@ -49,7 +71,8 @@ RUN \ tkn completion bash > $COMPDIR/tkn && \ virtctl completion bash > $COMPDIR/virtctl && \ rhoas completion bash > $COMPDIR/rhoas && \ - subctl completion bash > $COMPDIR/subctl + subctl completion bash > $COMPDIR/subctl && \ + cp /opt/google-cloud-sdk/completion.bash.inc $COMPDIR/gcloud COPY etc/initial_config /tmp/initial_config COPY etc/get-tooling-versions.sh /tmp/get-tooling-versions.sh @@ -70,7 +93,6 @@ RUN for f in "${HOME}" "${INITIAL_CONFIG}" "${WRAPPER_BINARIES}" "${DOWNLOADED_B USER 1001 ENV SHELL=/bin/bash -ENV PATH="${WRAPPER_BINARIES}:${DOWNLOADED_BINARIES}:${PATH}" ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/etc/get-tooling-versions.sh b/etc/get-tooling-versions.sh index 8acaff3..b60b97f 100755 --- a/etc/get-tooling-versions.sh +++ b/etc/get-tooling-versions.sh @@ -61,8 +61,21 @@ if command -v rhoas &>/dev/null; then append_ver "rhoas |${RHOAS_VER#v} |Red Hat OpenShift Application Services CLI" fi +GIT_VER=$(git --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') +append_ver "git |${GIT_VER#v} |Git" + JQ_VER=$(jq --version) JQ_VER=${JQ_VER#jq-} append_ver "jq |${JQ_VER#v} |jq" +if command -v gcloud &>/dev/null; then + GCLOUD_VER=$(gcloud version 2>/dev/null | head -1 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') + append_ver "gcloud |${GCLOUD_VER#v} |Google Cloud SDK" +fi + +if command -v claude &>/dev/null; then + CLAUDE_VER=$(claude --version | grep -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+') + append_ver "claude |${CLAUDE_VER#v} |Claude Code agentic coding tool" +fi + echo -e "$INSTALLED_TOOLS" | column -t -s '|' diff --git a/etc/initial_config/.bashrc b/etc/initial_config/.bashrc index 91853a9..3a37b33 100755 --- a/etc/initial_config/.bashrc +++ b/etc/initial_config/.bashrc @@ -21,3 +21,6 @@ PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" PS1='\s-\v \w \$ ' echo 'Welcome to the OpenShift Web Terminal. Type "help" for a list of installed CLI tools.' +if command -v claude &>/dev/null; then + echo 'Claude Code is available. Type "claude" to start an AI-powered coding assistant.' +fi diff --git a/etc/initial_config/.zshrc b/etc/initial_config/.zshrc index 2dc5ad4..a99f75f 100644 --- a/etc/initial_config/.zshrc +++ b/etc/initial_config/.zshrc @@ -51,3 +51,6 @@ fi PROMPT='%1N %~ %# ' echo 'Welcome to the OpenShift Web Terminal. Type "help" for a list of installed CLI tools.' +if command -v claude &>/dev/null; then + echo 'Claude Code is available. Type "claude" to start an AI-powered coding assistant.' +fi diff --git a/rh-manifest.txt b/rh-manifest.txt index ac4c7b2..4779806 100644 --- a/rh-manifest.txt +++ b/rh-manifest.txt @@ -1,5 +1,5 @@ oc 4.21.4 https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.21.4/ -kubectl https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.21.4/ +kubectl v1.34.1 https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.21.4/ kustomize 5.8.1 https://github.com/kubernetes-sigs/kustomize/tree/kustomize/v5.8.1 helm 3.17.1 https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/helm/3.17.1 tekton 1.20.0 https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/pipelines/1.20.0