forked from openshift/cluster-node-tuning-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rhel9
32 lines (31 loc) · 1.79 KB
/
Dockerfile.rhel9
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
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.19-openshift-4.13 AS builder
WORKDIR /go/src/github.com/openshift/cluster-node-tuning-operator
COPY . .
RUN make build
# Switch to registry.ci.openshift.org/ocp/4.13:base once 4.13:base is UBI9-based
FROM registry.access.redhat.com/ubi9:latest
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/cluster-node-tuning-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/performance-profile-creator /usr/bin/
COPY manifests/*.yaml manifests/image-references /manifests/
ENV APP_ROOT=/var/lib/tuned
ENV PATH=${APP_ROOT}/bin:${PATH}
ENV HOME=${APP_ROOT}
WORKDIR ${APP_ROOT}
COPY assets ${APP_ROOT}
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/_output/openshift-tuned /usr/bin/
RUN INSTALL_PKGS=" \
tuned tuned-profiles-atomic tuned-profiles-cpu-partitioning tuned-profiles-mssql tuned-profiles-nfv tuned-profiles-nfv-guest \
tuned-profiles-nfv-host tuned-profiles-openshift tuned-profiles-oracle tuned-profiles-postgresql tuned-profiles-realtime \
tuned-profiles-sap tuned-profiles-sap-hana tuned-profiles-spectrumscale \
nmap-ncat procps-ng" && \
mkdir -p /etc/grub.d/ /boot && \
dnf install --setopt=tsflags=nodocs -y $INSTALL_PKGS && \
rm -rf /var/lib/tuned/tuned && \
touch /etc/sysctl.conf $APP_ROOT/provider && \
dnf clean all && \
rm -rf /var/cache/yum ~/patches /root/rpms && \
useradd -r -u 499 cluster-node-tuning-operator
ENTRYPOINT ["/usr/bin/cluster-node-tuning-operator"]
LABEL io.k8s.display-name="OpenShift cluster-node-tuning-operator" \
io.k8s.description="This is a component of OpenShift and manages the lifecycle of node-level tuning." \
io.openshift.release.operator=true