forked from redhat-cop/containers-quickstarts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (24 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
28 lines (24 loc) · 1.21 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
FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL io.k8s.description="OCP Bats"
LABEL io.k8s.display-name="OCP Bats"
ARG BATS_VERSION=1.2.1
ARG HELM_VERSION=3.5.2
ARG JQ_VERSION=1.6
ARG OC_VERSION=4.7
ARG YQ_VERSION=3.4.1
RUN microdnf install -y gzip tar ncurses && \
microdnf clean all && \
curl -L https://github.com/bats-core/bats-core/archive/v${BATS_VERSION}.tar.gz | tar -C /tmp -xzf - && \
/tmp/bats-core-${BATS_VERSION}/install.sh /opt/bats && \
rm -rf /tmp/bats-core-${BATS_VERSION} && \
ln -s /opt/bats/bin/bats /usr/local/bin/bats && \
curl -Lo /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \
chmod +x /usr/local/bin/jq && \
curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar --strip-components=1 -C /usr/local/bin -xzf - linux-amd64/helm && \
curl -Lo /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \
chmod +x /usr/local/bin/yq && \
curl -L http://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-${OC_VERSION}/openshift-client-linux.tar.gz | tar -C /usr/local/bin -xzf - && \
mkdir -p /code
WORKDIR /code
USER 1001
ENTRYPOINT ["bats"]