Dockerfile 930 Bytes
Newer Older
songlinfeng's avatar
songlinfeng committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM docker.io/golang:1.25.3-alpine3.22
RUN apk --no-cache add git pkgconfig build-base libdrm-dev
RUN apk --no-cache add hwloc-dev --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
RUN mkdir -p /go/src/github.com/DCU/k8s-device-plugin
ADD . /go/src/github.com/DCU/k8s-device-plugin
WORKDIR /go/src/github.com/DCU/k8s-device-plugin/cmd/k8s-device-plugin
RUN go install \
    -ldflags="-X main.gitDescribe=$(git -C /go/src/github.com/DCU/k8s-device-plugin/ describe --always --long --dirty)"

FROM alpine:3.22
LABEL \
    authors="songlinfeng" \
    name="k8s-device-plugin" \
    version="1.0.0" \
    description="DCU device plugin for Kubernetes"
RUN apk --no-cache add ca-certificates libdrm
RUN apk --no-cache add hwloc --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
songlinfeng's avatar
songlinfeng committed
18
19
COPY --from=0 /go/bin/k8s-device-plugin /bin
CMD ["k8s-device-plugin", "-logtostderr=true", "-stderrthreshold=INFO", "-v=5"]