-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.ocp
78 lines (62 loc) · 3.64 KB
/
Dockerfile.ocp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# -------------------------------------------------------------------
# Build Showroom Terminal Image for OpenShift Environments
# -------------------------------------------------------------------
FROM --platform=linux/amd64 quay.io/rhpds/openshift-showroom-terminal-baseimage:latest
# https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.14/openshift-client-linux.tar.gz
ARG OCP_VERSION="4.14"
# https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64
ARG HELM_VERSION="latest"
# https://mirror.openshift.com/pub/openshift-v4/clients/odo/v3.15.0/odo-linux-amd64
ARG ODO_VERSION="v3.15.0"
# https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/pipelines/latest/tkn-linux-amd64.tar.gz
ARG TKN_VERSION="latest"
# https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/serverless/latest/kn-linux-amd64
ARG KN_VERSION="latest"
# https://github.com/kubevirt/kubevirt/releases/download/v1.1.0/virtctl-v1.1.0-linux-amd64
ARG VIRTCTL_VERSION="v1.1.0"
# https://mirror.openshift.com/pub/rhacs/assets/latest/bin/linux/roxctl
ARG ROXCTL_VERSION="latest"
# Java/Quarkus Build environment
ARG MAVEN_VERSION="3.9.6"
ARG JAVA_VERSION="17"
ARG BUILD_DATE="2023-12-11"
LABEL maintainer="Wolfgang Kulhanek - [email protected]" \
build-date=$BUILD_DATE
USER root
# Java Build Environment
RUN dnf -y install java-${JAVA_VERSION}-openjdk java-${JAVA_VERSION}-openjdk-devel pinentry tzdata-java
# Maven
RUN wget -q -O /tmp/maven.tar.gz https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \
mkdir -p /usr/local/maven && tar -C /usr/local/maven --strip-components=1 -xzf /tmp/maven.tar.gz && \
ln -s /usr/local/maven/bin/mvn /usr/local/bin/mvn && \
rm /tmp/maven.tar.gz
# OC CLI
RUN wget -q -O /tmp/oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable-${OCP_VERSION}/openshift-client-linux.tar.gz && \
tar -C /usr/local/bin -zxvf /tmp/oc.tar.gz && \
rm /tmp/oc.tar.gz /usr/local/bin/README.md
# Helm
RUN wget -q -O /usr/local/bin/helm https://mirror.openshift.com/pub/openshift-v4/clients/helm/${HELM_VERSION}/helm-linux-amd64
# ODO
RUN wget -q -O /usr/local/bin/odo https://mirror.openshift.com/pub/openshift-v4/clients/odo/${ODO_VERSION}/odo-linux-amd64
# tkn
RUN wget -q -O /tmp/tkn.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/pipelines/${TKN_VERSION}/tkn-linux-amd64.tar.gz && \
tar -C /usr/local/bin -zxvf /tmp/tkn.tar.gz --no-same-owner && \
rm /tmp/tkn.tar.gz /usr/local/bin/LICENSE
# KN - The Serverless CLI
RUN wget -q -O /usr/local/bin/kn https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/serverless/${KN_VERSION}/kn-linux-amd64
# virtctl
RUN wget -q -O /usr/local/bin/virtctl https://github.com/kubevirt/kubevirt/releases/download/${VIRTCTL_VERSION}/virtctl-${VIRTCTL_VERSION}-linux-amd64
# roxctl
RUN wget -q -O /usr/local/bin/roxctl https://mirror.openshift.com/pub/rhacs/assets/${ROXCTL_VERSION}/bin/linux/roxctl
# Change all permissions
RUN chown root:root /usr/local/bin/* && \
chmod u=rwx,g=rwx,o=rx /usr/local/bin/*
# Set up Bash Completion for all tools
RUN /usr/local/bin/oc completion bash >/etc/bash_completion.d/openshift && \
/usr/local/bin/helm completion bash > /etc/bash_completion.d/helm && \
/usr/local/bin/odo completion bash > /etc/bash_completion.d/odo && \
/usr/local/bin/tkn completion bash >/etc/bash_completion.d/tkn && \
/usr/local/bin/kn completion bash >/etc/bash_completion.d/kn && \
/usr/local/bin/virtctl completion bash >/etc/bash_completion.d/virtctl && \
/usr/local/bin/roxctl completion bash >/etc/bash_completion.d/roxctl
USER lab-user