forked from intel/intel-ethernet-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.daemon
More file actions
61 lines (47 loc) · 2.48 KB
/
Dockerfile.daemon
File metadata and controls
61 lines (47 loc) · 2.48 KB
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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020-2021 Intel Corporation
FROM golang:alpine3.16 as builder
WORKDIR /workspace
COPY go.mod go.sum ./
RUN go mod download
COPY cmd cmd/
COPY pkg pkg/
COPY apis apis/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o fwddp_daemon cmd/fwddp-daemon/main.go
# Manually update zlib library
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.0.0-1644.1666621587 as package_installer
RUN microdnf install -y ethtool iproute kmod pciutils tar gzip gcc make && microdnf clean all
RUN curl -L -o zlib-1.2.13.tar.gz https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz && \
tar xzvf zlib-1.2.13.tar.gz
WORKDIR /zlib-1.2.13
RUN ./configure && make test && make install
FROM registry.access.redhat.com/ubi9/ubi-micro:9.1.0-6
ARG VERSION
### Required OpenShift Labels
LABEL name="Intel Ethernet Operator - daemonset" \
vendor="Intel Corporation" \
version=$VERSION \
release="1" \
summary="Manages the FW and DPP updates of E810 NICs" \
description="The daemonset container is responsible for building the nodes inventory and configuring the FW and DDP updates on E810 series NICs"
WORKDIR /
COPY --from=builder /workspace/fwddp_daemon .
COPY --from=package_installer /lib64/libm.so.6 /lib64/libmnl.so.0 /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 \
/lib64/libzstd.so.1 /lib64/liblzma.so.5 /lib64/libcrypto.so.3 /lib64/libgcc_s.so.1 \
/lib64/libpci.so.3 /lib64/libkmod.so.2 /lib64/libbpf.so.0 \
/lib64/libmnl.so.0 /lib64/libtinfo.so.6 /lib64/libsigsegv.so.2.0.6 /lib64/libsigsegv.so.2 \
/lib64/libreadline.so.8.1 /lib64/libreadline.so.8 /lib64/libmpfr.so.6.1.0 /lib64/libmpfr.so.6 \
/lib64/libgmp.so.10.4.0 /lib64/libgmp.so.10 /lib64/
RUN ln -sf /usr/lib64/libsigsegv.so.2.0.6 /usr/lib64/libsigsegv.so.2 && \
ln -sf /usr/lib64/libreadline.so.8.1 /usr/lib64/libreadline.so.8 && \
ln -sf /usr/lib64/libmpfr.so.6.1.0 /usr/lib64/libmpfr.so.6 && \
ln -sf /usr/lib64/libgmp.so.10.4.0 /usr/lib64/libgmp.so.10
COPY --from=package_installer /usr/local/lib/libz.so.1.2.13 /lib64/libz.so.1
COPY --from=package_installer /usr/sbin/ethtool /usr/sbin/lspci \
/usr/sbin/setpci /usr/sbin/update-pciids /usr/sbin/ip /usr/sbin/devlink /usr/sbin/
COPY --from=package_installer /usr/bin/kmod /usr/bin/
COPY --from=package_installer /bin/awk /bin/sed /bin/
RUN mkdir /usr/share/hwdata
COPY --from=package_installer /usr/share/hwdata /usr/share/hwdata
ENTRYPOINT ["/fwddp_daemon"]