forked from topolvm/topolvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (25 loc) · 862 Bytes
/
Dockerfile
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
# Build Container
FROM --platform=$BUILDPLATFORM golang:1.18-buster AS build-env
# Get argment
ARG TOPOLVM_VERSION
ARG TARGETARCH
COPY . /workdir
WORKDIR /workdir
RUN touch csi/*.go lvmd/proto/*.go \
&& make build-topolvm TOPOLVM_VERSION=${TOPOLVM_VERSION} GOARCH=${TARGETARCH}
# TopoLVM container
FROM --platform=$TARGETPLATFORM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
btrfs-progs \
file \
xfsprogs \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build-env /workdir/build/hypertopolvm /hypertopolvm
RUN ln -s hypertopolvm /lvmd \
&& ln -s hypertopolvm /topolvm-scheduler \
&& ln -s hypertopolvm /topolvm-node \
&& ln -s hypertopolvm /topolvm-controller
COPY --from=build-env /workdir/LICENSE /LICENSE
ENTRYPOINT ["/hypertopolvm"]