forked from Xilinx-CNS/kubernetes-onload
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeviceplugin.Dockerfile
More file actions
30 lines (21 loc) · 848 Bytes
/
deviceplugin.Dockerfile
File metadata and controls
30 lines (21 loc) · 848 Bytes
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
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: (c) Copyright 2023 Advanced Micro Devices, Inc.
FROM golang:1.21 AS builder
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY Makefile /app/Makefile
COPY pkg/client_helper /app/pkg/client_helper
COPY pkg/control_plane /app/pkg/control_plane
COPY pkg/deviceplugin /app/pkg/deviceplugin
COPY cmd/deviceplugin /app/cmd/deviceplugin
COPY cmd/worker /app/cmd/worker
COPY LICENSE /app/LICENSE
RUN CGO_ENABLED=0 make device-plugin-build worker-build
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9
RUN microdnf install -y lshw-B.02.19.2 && microdnf clean all
COPY --from=builder /app/bin/onload-device-plugin /app/bin/onload-worker /usr/bin/
COPY --from=builder /app/LICENSE /licenses/LICENSE
USER 1001
ENTRYPOINT ["/usr/bin/onload-device-plugin"]