UNCLASSIFIED

Dockerfile 3.73 KB
Newer Older
1
FROM registry.access.redhat.com/ubi8/ubi:8.3
Josh Wolf's avatar
Josh Wolf committed
2

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
RUN echo $'[centos-appstream]\n\
name=CentOS-AppStream\n\
baseurl=http://mirror.centos.org/centos/8/AppStream/x86_64/os\n\
enabled=1\n\
gpgcheck=0\n\
[BaseOS]\n\
name=CentOS-BaseOS\n\
baseurl=http://mirror.centos.org/centos/8/BaseOS/x86_64/os\n\
enabled=1\n\
gpgcheck=0\n'\
>> /etc/yum.repos.d/CentOS.repo

RUN curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

RUN yum install -y git unzip jq tar curl findutils bind-utils wget openssl docker-ce-cli \
    # cypress dependencies
    npm xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib
Josh Wolf's avatar
Josh Wolf committed
20 21

# Install Conftest
22
ENV CONFTEST_VERSION='0.23.0'
Josh Wolf's avatar
Josh Wolf committed
23 24 25 26
ADD https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz /conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz
RUN tar xzf /conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz -C /usr/local/bin/  && chmod +x /usr/local/bin/conftest && rm -rf /conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz

# Install Helm
27
ENV HELM_VERSION='3.5.1'
Josh Wolf's avatar
Josh Wolf committed
28 29 30 31 32 33 34
ADD https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz /helm-v${HELM_VERSION}-linux-amd64.tar.gz
RUN tar xzf /helm-v${HELM_VERSION}-linux-amd64.tar.gz -C /usr/local/bin/ --strip-components 1 && chmod +x /usr/local/bin/helm && rm -rf /helm-v${HELM_VERSION}-linux-amd64.tar.gz

# Install Conftest for helm plugin
RUN helm plugin install https://github.com/instrumenta/helm-conftest

# Install fluxcd
35
ENV FLUX_VERSION='0.9.1'
Josh Wolf's avatar
Josh Wolf committed
36 37 38 39
ADD https://github.com/fluxcd/flux2/releases/download/v${FLUX_VERSION}/flux_${FLUX_VERSION}_linux_amd64.tar.gz /flux_${FLUX_VERSION}_linux_amd64.tar.gz
RUN tar xzf /flux_${FLUX_VERSION}_linux_amd64.tar.gz -C /usr/local/bin/ && chmod +x /usr/local/bin/flux && rm -rf /flux_${FLUX_VERSION}_linux_amd64.tar.gz

# Install kubectl
40
ENV KUBECTL_VERSION='1.20.4'
Josh Wolf's avatar
Josh Wolf committed
41 42 43
ADD https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl
RUN chmod +x /usr/local/bin/kubectl

44 45 46 47 48
# Install Istio
ENV ISTIO_VERSION='1.9.1'
ADD https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz /istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz
RUN tar xzf /istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz -C /usr/local/bin/ && chmod +x /usr/local/bin/istioctl && rm -rf /istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz

Josh Wolf's avatar
Josh Wolf committed
49
# Install yq
50
RUN curl -sfL -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64 && \
Josh Wolf's avatar
Josh Wolf committed
51 52 53 54 55 56 57
    chmod +x /usr/local/bin/yq

# Install aws cli
RUN curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscliv2.zip && \
    unzip -qq -d /tmp /tmp/awscliv2.zip && \
    /tmp/aws/install && \
    rm -rf /tmp/aws*
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

# Install tree for directory structure
RUN yum -y install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/tree-1.7.0-15.el8.x86_64.rpm

# Cypress install
RUN npm install cypress && \
    ln -s /node_modules/cypress/bin/cypress /usr/local/bin/cypress && \
    cypress verify

# Install k3d
ENV K3D_VERSION="v4.3.0"
RUN curl -fL -o /usr/local/bin/k3d https://github.com/rancher/k3d/releases/download/${K3D_VERSION}/k3d-linux-amd64 && \
    chmod +x /usr/local/bin/k3d

# Install Kustomize
ENV KUSTOMIZE_VERSION='4.1.2'
ADD https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz /kustomize-${KUSTOMIZE_VERSION}-linux-amd64.tar.gz
RUN tar xzf /kustomize-${KUSTOMIZE_VERSION}-linux-amd64.tar.gz -C /usr/local/bin/ && chmod +x /usr/local/bin/kustomize && rm -rf /kustomize-${KUSTOMIZE_VERSION}-linux-amd64.tar.gz

# Remove needed repos
RUN rm -rf /etc/yum.repos.d/CentOS.repo && \
    yum clean all