-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile-konflux
More file actions
74 lines (63 loc) · 2.87 KB
/
Dockerfile-konflux
File metadata and controls
74 lines (63 loc) · 2.87 KB
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
FROM registry.redhat.io/openshift4/ose-cli:latest
# Set the working directory
WORKDIR /tmp/
# Install system dependencies
RUN dnf -y install jq vim unzip git make curl tar python3-pip \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# Set environment variables
ENV GOPATH=/tmp/go \
GOBIN=/tmp/go/bin \
GOCACHE=/tmp/.cache/go-build \
PATH=$PATH:/tmp/go/bin:/usr/local/go/bin \
CHAINSAW_VERSION=v0.2.13 \
GO_VERSION=1.24.2
# Install Go and create directories with proper permissions
RUN curl -Lo /tmp/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
&& rm -f /tmp/go.tar.gz \
&& mkdir -p /tmp/go/bin $GOCACHE \
&& chmod 777 /tmp/go/bin $GOPATH $GOCACHE \
&& go version
# Install chainsaw, oc and kubectl
RUN curl -L -o chainsaw.tar.gz https://github.com/kyverno/chainsaw/releases/download/${CHAINSAW_VERSION}/chainsaw_linux_amd64.tar.gz \
&& tar -xzf chainsaw.tar.gz \
&& chmod +x chainsaw \
&& mv chainsaw /usr/local/bin/ \
&& rm -f chainsaw.tar.gz \
&& curl -L -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux-amd64-rhel8.tar.gz \
&& tar -xvzf oc.tar.gz \
&& chmod +x oc kubectl \
&& mv oc kubectl /usr/local/bin/ \
&& rm -f oc.tar.gz
# Install logcli
RUN curl -LO https://github.com/grafana/loki/releases/latest/download/logcli-linux-amd64.zip \
&& unzip logcli-linux-amd64.zip \
&& chmod +x logcli-linux-amd64 \
&& mv logcli-linux-amd64 /usr/local/bin/logcli \
&& rm -f logcli-linux-amd64.zip
# Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install
# Install Azure CLI
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
&& dnf install -y https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm \
&& dnf install -y azure-cli \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# Install Google Cloud CLI
RUN curl -LO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz \
&& tar -xf google-cloud-cli-linux-x86_64.tar.gz \
&& ./google-cloud-sdk/install.sh -q \
&& rm -f google-cloud-cli-linux-x86_64.tar.gz
# Install operator-sdk
RUN echo "Install operator-sdk and dependencies" \
&& export OPERATOR_SDK_VERSION=1.36.1 \
&& export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) \
&& export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION} \
&& curl -Lo /usr/local/bin/operator-sdk ${OPERATOR_SDK_DL_URL}/operator-sdk_linux_${ARCH} \
&& chmod +x /usr/local/bin/operator-sdk \
&& operator-sdk version
# Add gcloud to PATH
ENV PATH="/tmp/google-cloud-sdk/bin:${PATH}"