Added support for v1 and v2 cgroups

No longer using a plugin to deploy solution
This commit is contained in:
Nadeem Douba
2023-07-03 09:58:18 -04:00
parent fe71719e45
commit 752fc9b8ba
12 changed files with 987 additions and 204 deletions

View File

@@ -1,17 +1,20 @@
FROM debian
# syntax=docker/dockerfile:1
FROM golang:1.19
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /go/src/github.com/allfro/device-volume-driver
COPY . .
RUN apt update && \
apt install -y musl-dev musl-tools git curl && \
curl -L -o go.tgz https://go.dev/dl/go1.19.3.linux-amd64.tar.gz && \
tar -zxvf go.tgz && \
export PATH=$PATH:go/bin && \
go get && \
CC=/usr/bin/musl-gcc go build -ldflags "-linkmode external -extldflags -static" -o /dvd
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o /dvd
FROM alpine
WORKDIR /
COPY --from=0 /dvd /dvd
ENTRYPOINT ["/dvd"]