Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
52 lines (50 loc) · 2.9 KB

File metadata and controls

52 lines (50 loc) · 2.9 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# Use RHEL 9 as the primary builder base for the Machine Config Operator
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS rhel9-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .
RUN make install DESTDIR=./instroot-rhel9
# Add a RHEL 8 builder to compile the RHEL 8 compatible binaries
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.25-openshift-4.22 AS rhel8-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
# Copy the RHEL 8 machine-config-daemon binary and rename
COPY . .
RUN make install DESTDIR=./instroot-rhel8
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
ARG TAGS=""
COPY install /manifests
RUN if [ "${TAGS}" = "fcos" ]; then \
# comment out non-base/extensions image-references entirely for fcos
sed -i '/- name: rhel-coreos-/,+3 s/^/#/' /manifests/image-references && \
# comment out rhel-coreos-10 entirely for fcos
sed -i '/- name: rhel-coreos-10/,+3 s/^/#/' /manifests/image-references && \
# also remove extensions from the osimageurl configmap (if we don't, oc won't rewrite it, and the placeholder value will survive and get used)
sed -i '/baseOSExtensionsContainerImage:/ s/^/#/' /manifests/0000_80_machine-config_05_osimageurl.yaml && \
# rewrite image names for fcos
sed -i 's/rhel-coreos/fedora-coreos/g' /manifests/*; \
elif [ "${TAGS}" = "scos" ]; then \
# comment out rhel-coreos-10 for scos
sed -i '/- name: rhel-coreos-10/,+3 s/^/#/' /manifests/* && \
# rewrite image names for scos
sed -i 's/rhel-coreos/stream-coreos/g' /manifests/*; fi && \
dnf -y install 'nmstate >= 2.2.10' && \
if ! rpm -q util-linux; then dnf install -y util-linux; fi && \
# We also need to install fuse-overlayfs and cpp for Buildah to work correctly.
if ! rpm -q buildah; then dnf install -y buildah fuse-overlayfs cpp --exclude container-selinux; fi && \
# Create the build user which will be used for doing OS image builds. We
# use the username "build" and the uid 1000 since this matches what is in
# the official Buildah image.
# Conditional checks if "build" user does not exist before adding user.
if ! id -u "build" >/dev/null 2>&1; then useradd --uid 1000 build; fi && \
dnf clean all && \
rm -rf /var/cache/dnf/*
# Copy the binaries directly from their build stages into their final location.
# Do this after package installation to avoid invalidating state for faster
# local builds.
COPY --from=rhel9-builder /go/src/github.com/openshift/machine-config-operator/instroot-rhel9/usr/bin/* /usr/bin/
# Copy the RHEL 8 machine-config-daemon binary and rename
COPY --from=rhel8-builder /go/src/github.com/openshift/machine-config-operator/instroot-rhel8/usr/bin/machine-config-daemon /usr/bin/machine-config-daemon.rhel8
COPY templates /etc/mcc/templates
ENTRYPOINT ["/usr/bin/machine-config-operator"]
LABEL io.openshift.release.operator true
Morty Proxy This is a proxified and sanitized view of the page, visit original site.