Repository navigation
Expand file tree
/
Copy pathContainerfile.iib-build-task
More file actions
80 lines (73 loc) · 5.36 KB
/
Copy pathContainerfile.iib-build-task
File metadata and controls
80 lines (73 loc) · 5.36 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
75
76
77
78
79
80
FROM quay.io/konflux-ci/buildah-task:latest@sha256:4d8273444b0f2781264c232e12e88449bbf078c99e3da2a7f6dcaaf27bc53712
WORKDIR /opt/app-root/src
# We need multiple OPM versions because IIB uses different upstream versions for different OCP versions
ARG OPM_VERSION_1_26_4=v1.26.4
ARG OPM_VERSION_1_28_0=v1.28.0
ARG OPM_VERSION_1_40_0=v1.40.0
ARG OPM_VERSION_1_44_0=v1.44.0
ARG OPM_VERSION_1_48_0=v1.48.0
ARG OPM_VERSION_1_50_0=v1.50.0
ARG OPM_VERSION_1_57_0=v1.57.0
ARG OPM_VERSION_1_61_0=v1.61.0
ARG OPM_VERSION_1_67_0=v1.67.0
ARG OPM_VERSION_1_69_0=v1.69.0
ARG OPM_VERSION_1_73_0=v1.73.0
ARG OPM_SHA256_1_26_4=cf94e9dbd58c338e1eed03ca50af847d24724b99b40980812abbe540e8c7ff8e
ARG OPM_SHA256_1_28_0=e18e5abc8febb63c9dc76db0f33475553d98495465bd2dca81c39dcdbc875c08
ARG OPM_SHA256_1_40_0=33eb929264a69f31895e1973248b7e97e3b6a862d7ca27f6892e158f79ad6aeb
ARG OPM_SHA256_1_44_0=21f0a423dfbfcddcffdde98266307a08d87b4db980be859b9e252a5a24df51bf
ARG OPM_SHA256_1_48_0=0a301826baff730489162caff13e04f7dc16c1a79072cbcbdfc5379d95caef40
ARG OPM_SHA256_1_50_0=d9bfdc08dd9640c1d9085d191f10f884f2ef29370db1ac097a73a0e23e803f95
ARG OPM_SHA256_1_57_0=8d2f51f166f47f76eb6906c4de9af90462b7163cbacef6c932bda4829ec086c7
ARG OPM_SHA256_1_61_0=c5701ef59e12c930337a9a9363cd44c2a4d9f64f6d4f96513d3511a36f81cf5d
ARG OPM_SHA256_1_67_0=dc1e5bd58b17fdb1454f94000193469578dff1ab588ad21ecc4020ea478fc2c8
ARG OPM_SHA256_1_69_0=5bfa8f734141b4ab33272838ed7829b899630111f8556779ec29634189c5dbc6
ARG OPM_SHA256_1_73_0=cc0768c3ca915ad1fb72f88ad7cfcb533870fdbb6af83de290b66a5439a28140
ARG ORAS_VERSION="1.2.3"
RUN microdnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install \
findutils \
gzip \
jq \
tar \
python3 \
python3-pip \
skopeo \
git \
python3-file-magic && \
microdnf clean all
# Install Python dependencies
RUN pip3 install --no-cache-dir \
tenacity \
GitPython \
kubernetes \
ruamel.yaml
# Install OPM versions
RUN curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_26_4}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_26_4}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_26_4} /usr/bin/opm-${OPM_VERSION_1_26_4}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_28_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_28_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_28_0} /usr/bin/opm-${OPM_VERSION_1_28_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_40_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_40_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_40_0} /usr/bin/opm-${OPM_VERSION_1_40_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_44_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_44_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_44_0} /usr/bin/opm-${OPM_VERSION_1_44_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_48_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_48_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_48_0} /usr/bin/opm-${OPM_VERSION_1_48_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_50_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_50_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_50_0} /usr/bin/opm-${OPM_VERSION_1_50_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_57_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_57_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_57_0} /usr/bin/opm-${OPM_VERSION_1_57_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_61_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_61_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_61_0} /usr/bin/opm-${OPM_VERSION_1_61_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_67_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_67_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_67_0} /usr/bin/opm-${OPM_VERSION_1_67_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_69_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_69_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_69_0} /usr/bin/opm-${OPM_VERSION_1_69_0}" | sha256sum --check --status && \
curl -fsSL -o /usr/bin/opm-"${OPM_VERSION_1_73_0}" https://github.com/operator-framework/operator-registry/releases/download/"${OPM_VERSION_1_73_0}"/linux-amd64-opm && \
echo "${OPM_SHA256_1_73_0} /usr/bin/opm-${OPM_VERSION_1_73_0}" | sha256sum --check --status && \
curl -s -L -o oras.tar.gz https://github.com/oras-project/oras/releases/download/v"${ORAS_VERSION}"/oras_"${ORAS_VERSION}"_linux_amd64.tar.gz && \
tar -xzf oras.tar.gz && rm oras.tar.gz && ls -la && mv oras /usr/bin/oras && chmod +x /usr/bin/oras && \
chmod +x /usr/bin/opm-*
# Copy the multi-arch builder script
COPY task/iib-image-builder-oci-ta/multi-arch-builder.py /usr/local/bin/multi-arch-builder.py
RUN chmod +x /usr/local/bin/multi-arch-builder.py
ENTRYPOINT ["/usr/bin/bash"]