@@ -4,44 +4,24 @@ COPY . .
4
4
RUN make update-tuned-submodule
5
5
RUN make build
6
6
7
- FROM quay.io/centos/centos:stream9 as tuned
8
- WORKDIR /root
9
- COPY assets /root/assets
10
- RUN INSTALL_PKGS=" \
11
- gcc git rpm-build make desktop-file-utils patch dnf-plugins-core \
12
- " && \
13
- dnf install --setopt=tsflags=nodocs -y $INSTALL_PKGS && \
14
- cd assets/tuned/tuned && \
15
- LC_COLLATE=C cat ../patches/*.diff | patch -Np1 && \
16
- dnf build-dep tuned.spec -y && \
17
- make rpm PYTHON=/usr/bin/python3 && \
18
- rm -rf /root/rpmbuild/RPMS/noarch/{tuned-gtk*,tuned-utils*,tuned-profiles-compat*}
19
-
20
7
FROM quay.io/centos/centos:stream9
21
8
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/cluster-node-tuning-operator /usr/bin/
22
9
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/performance-profile-creator /usr/bin/
23
10
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/gather-sysinfo /usr/bin/
11
+
12
+ ENV ASSETS_DIR=/root/assets
13
+ COPY assets $ASSETS_DIR
14
+
15
+ COPY hack/dockerfile_install_support.sh /tmp
16
+ RUN /bin/bash /tmp/dockerfile_install_support.sh
17
+
24
18
COPY manifests/*.yaml manifests/image-references /manifests/
25
19
ENV APP_ROOT=/var/lib/ocp-tuned
26
20
ENV PATH=${APP_ROOT}/bin:${PATH}
27
21
ENV HOME=${APP_ROOT}
28
22
ENV SYSTEMD_IGNORE_CHROOT=1
29
23
WORKDIR ${APP_ROOT}
30
- COPY --from=tuned /root/assets/bin /usr/local/bin
31
- COPY --from=tuned /root/rpmbuild/RPMS/noarch /root/rpms
32
- RUN INSTALL_PKGS=" \
33
- nmap-ncat procps-ng pciutils \
34
- " && \
35
- mkdir -p /etc/grub.d/ /boot /var/lib/ocp-tuned && \
36
- dnf install --setopt=tsflags=nodocs -y $INSTALL_PKGS && \
37
- rpm -V $INSTALL_PKGS && \
38
- dnf --setopt=tsflags=nodocs -y install /root/rpms/*.rpm && \
39
- rm -rf /etc/tuned/recommend.d && \
40
- echo auto > /etc/tuned/profile_mode && \
41
- sed -Ei 's|^#?\s *enable_unix_socket\s *=.*$|enable_unix_socket = 1|;s|^#?\s *rollback\s *=.*$|rollback = not_on_exit|;s|^#?\s *profile_dirs\s *=.*$|profile_dirs = /var/lib/ocp-tuned/profiles,/usr/lib/tuned|' \
42
- /etc/tuned/tuned-main.conf && \
43
- touch /etc/sysctl.conf && \
44
- dnf clean all && \
24
+ RUN dnf clean all && \
45
25
rm -rf /var/cache/yum ~/patches /root/rpms && \
46
26
useradd -r -u 499 cluster-node-tuning-operator
47
27
ENTRYPOINT ["/usr/bin/cluster-node-tuning-operator" ]
0 commit comments