-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile.daemon
91 lines (66 loc) · 2.47 KB
/
Dockerfile.daemon
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
81
82
83
84
85
86
87
88
89
90
91
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020-2024 Intel Corporation
FROM golang:1.23.4 AS builder
WORKDIR /workspace-pf
RUN git clone --depth 1 --branch v24.11 https://github.com/intel/pf-bb-config /workspace-pf/pf-bb-config
WORKDIR /workspace-pf/pf-bb-config
RUN ./build.sh
WORKDIR /workspace-go
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/daemon/ cmd/daemon/
COPY pkg pkg/
COPY api api/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o sriov_fec_daemon cmd/daemon/main.go
FROM registry.access.redhat.com/ubi9/ubi:9.5-1732804088 AS package_installer
RUN yum install \
kmod-28-10.el9 \
pciutils-3.7.0-5.el9 \
procps-ng-3.3.17-14.el9 \
--releasever 9 --setopt install_weak_deps=false --nodocs -y && \
yum clean all
WORKDIR /workspace
RUN curl -L https://pci-ids.ucw.cz/v2.2/pci.ids.gz -o pci.ids.gz && \
gzip -d -v pci.ids.gz && \
rm -rfv ./pci.ids.gz
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5-1731593028
ARG VERSION
### Required OpenShift Labels
LABEL name="Intel® vRAN Boost accelerator operator daemonset container" \
vendor="Intel Corporation" \
version=$VERSION \
release="1" \
maintainer="Intel Corporation" \
summary="Manages SR-IOV resources on Intel® vRAN Boost accelerator" \
description="The daemonset container is responsible for building the nodes inventory and configuring the SR-IOV portion of the supported accelerators"
COPY --from=package_installer \
/lib64/libpci.so.3 \
/lib64/libkmod.so.2 \
/lib64/libprocps.so.8.0.3 \
/lib64/
RUN ln -sf /usr/lib64/libprocps.so.8.0.3 /usr/lib64/libprocps.so.8
COPY --from=package_installer \
/usr/sbin/lspci \
/usr/sbin/setpci \
/usr/sbin/modprobe \
/usr/sbin/
COPY --from=package_installer \
/usr/bin/kmod \
/usr/bin/pkill \
/usr/bin/pgrep \
/usr/bin/
RUN mkdir -p /usr/share/hwdata && \
mkdir -p /usr/share/misc && \
mkdir -p /sriov_workdir && \
mkdir -p /sriov_workdir/vrb1 && \
mkdir -p /sriov_workdir/vrb2
COPY --from=package_installer /workspace/pci.ids /usr/share/misc/pci.ids
RUN ln -sf /usr/share/misc/pci.ids /usr/share/hwdata/pci.ids
USER 1001
COPY TEMP_LICENSE_COPY /licenses/LICENSE
WORKDIR /sriov_workdir
COPY --from=builder /workspace-go/sriov_fec_daemon .
COPY --from=builder /workspace-pf/pf-bb-config/pf_bb_config .
COPY --from=builder /workspace-pf/pf-bb-config/vrb1/srs_fft_windows_coefficient.bin vrb1/
COPY --from=builder /workspace-pf/pf-bb-config/vrb2/srs_fft_windows_coefficient.bin vrb2/
ENTRYPOINT ["/sriov_workdir/sriov_fec_daemon"]