Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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" ]

Expand Down
13 changes: 13 additions & 0 deletions etc/get-tooling-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '|'
3 changes: 3 additions & 0 deletions etc/initial_config/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions etc/initial_config/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rh-manifest.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading