forked from oVirt/buildcontainer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.stream9
73 lines (62 loc) · 2.01 KB
/
Dockerfile.stream9
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
FROM quay.io/centos/centos:stream9
# Install DNF core plugins
RUN dnf install -y dnf-plugins-core
# Ensure crypto policies are installed
RUN dnf install -y crypto-policies-scripts crypto-policies
# Use legacy cryptopolicy as workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2059101
# until https://pagure.io/copr/copr/issue/2106 is fixed
RUN update-crypto-policies --set LEGACY
# Install oVirt repositories
RUN dnf copr enable -y ovirt/ovirt-master-snapshot centos-stream-9 \
&& dnf install -y ovirt-release-master
# Configure CS9 repositories
RUN dnf config-manager --enable crb
# Add "build" user for optional non-root builds
# Install required packages and the GitHub CLI tool so actions can use it when running in the container
RUN \
useradd build \
&& dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo \
&& dnf -y install \
gh \
createrepo_c \
dnf-utils \
&& dnf clean all
COPY containerroot /
WORKDIR /tmp/src-rpm
# Download source rpms and install it's dependencies
RUN reposync --repoid=copr:copr.fedorainfracloud.org:ovirt:ovirt-master-snapshot --source --newest-only \
&& \
find . -iname '*.src.rpm' -exec mv {} . \; \
&& \
dnf builddep -y *.src.rpm \
&& \
rm -rf *
WORKDIR /
# Install missing dependencies for oVirt appliance and node
RUN dnf install -y \
asciidoc \
libvirt \
libguestfs-tools\
lorax \
pykickstart \
python3-jinja2 \
python3-pyyaml \
virt-install \
python3-sh \
oz \
imagefactory \
imagefactory-plugins-ovfcommon \
&& \
dnf clean all
# Install dependencies for ost-images that we do not ship
# Only on el9 since el8 container is not usable on el9 host
# The resulting images are independent of build platform
RUN git clone https://github.com/oVirt/ost-images.git \
&& cd ost-images \
&& autoreconf -i \
&& ./configure \
&& make spec \
&& dnf builddep -y ost-images.spec \
&& cd .. \
&& rm -rf ost-images \
&& dnf clean all