-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile.upstream
26 lines (20 loc) · 983 Bytes
/
Dockerfile.upstream
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
FROM golang:1.21 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN make
FROM fedora:38
ARG OC_VERSION=latest
ARG UMOCI_VERSION=latest
RUN curl -LJo "openshift-client-linux-${OC_VERSION}.tar.gz" "https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/${OC_VERSION}/openshift-client-linux.tar.gz" \
&& tar -C /usr/local/bin -xzvf "openshift-client-linux-$OC_VERSION.tar.gz" oc
RUN dnf -y update && dnf install -y binutils go file runc podman jq skopeo && dnf clean all
RUN curl --fail --retry 3 -LJO https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.14/opm-linux.tar.gz && \
tar -xzf opm-linux.tar.gz && \
mv ./opm /usr/local/bin/ && \
rm -f opm-linux.tar.gz
RUN wget -O /usr/local/bin/umoci "https://github.com/opencontainers/umoci/releases/download/$UMOCI_VERSION/umoci.amd64" && \
chmod +x /usr/local/bin/umoci
COPY --from=builder /app/check-payload /check-payload
ENTRYPOINT ["/check-payload"]