-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile.labeler
40 lines (28 loc) · 1.25 KB
/
Dockerfile.labeler
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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020-2024 Intel Corporation
FROM golang:1.23.4 as builder
WORKDIR /workspace
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/labeler/ cmd/labeler/
COPY pkg/ pkg/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o node_labeler cmd/labeler/main.go
RUN wget --progress=dot:giga https://pci-ids.ucw.cz/v2.2/pci.ids.gz -O pci.ids.gz && gunzip pci.ids.gz
FROM registry.access.redhat.com/ubi9/ubi-micro:9.5-1733126338
ARG VERSION
### Required OpenShift Labels
LABEL name="Intel® vRAN Boost accelerator operator discovery container" \
vendor="Intel Corporation" \
version=$VERSION \
release="1" \
maintainer="Intel Corporation" \
summary="Detects and labels kubernetes nodes that include Intel® vRAN Boost accelerator" \
description="The container tries to detect Intel® vRAN Boost accelerators and label the nodes that contain them \
and remove the label for nodes that do not."
RUN mkdir -p /usr/share/misc/
COPY --from=builder /workspace/pci.ids /usr/share/misc/pci.ids
COPY TEMP_LICENSE_COPY /licenses/LICENSE
USER 1001
WORKDIR /labeler-workspace
COPY --from=builder /workspace/node_labeler .
ENTRYPOINT ["bash", "-c", "/labeler-workspace/node_labeler && sleep infinity"]