forked from openshift/tls-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 1.23 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
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN make build
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
ARG OC_VERSION=latest
ARG TARGETARCH
ARG TESTSSL_VERSION=3.2.2
RUN dnf -y update && \
dnf install -y --allowerasing binutils file podman runc jq skopeo tar lsof openssl bash && \
dnf clean all
RUN wget -O "openshift-client-linux-${OC_VERSION}.tar.gz" "https://mirror.openshift.com/pub/openshift-v4/${TARGETARCH}/clients/ocp/${OC_VERSION}/openshift-client-linux.tar.gz" && \
tar -C /usr/local/bin -xzvf "openshift-client-linux-$OC_VERSION.tar.gz" oc && \
rm -f "openshift-client-linux-$OC_VERSION.tar.gz"
# Install testssl.sh
RUN curl -L "https://testssl.sh/testssl.sh-${TESTSSL_VERSION}.tar.gz" -o /tmp/testssl.tar.gz && \
mkdir -p /opt/testssl && \
tar -xzf /tmp/testssl.tar.gz -C /opt/testssl --strip-components=1 && \
chmod +x /opt/testssl/testssl.sh && \
ln -s /opt/testssl/testssl.sh /usr/local/bin/testssl.sh && \
rm -f /tmp/testssl.tar.gz
COPY --from=builder /app/bin/tls-scanner /usr/local/bin/tls-scanner
ENTRYPOINT ["/usr/local/bin/tls-scanner"]
LABEL com.redhat.component="tls-scanner"