forked from topolvm/topolvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.with-sidecar
37 lines (28 loc) · 1.03 KB
/
Dockerfile.with-sidecar
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
# Build Container
FROM golang:1.16-buster AS build-env
# Get argment
ARG TOPOLVM_VERSION
COPY . /workdir
WORKDIR /workdir
RUN touch csi/*.go lvmd/proto/*.go docs/*.md \
&& make build TOPOLVM_VERSION=${TOPOLVM_VERSION}
# TopoLVM container
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
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
# CSI sidecar
COPY --from=build-env /workdir/build/csi-provisioner /csi-provisioner
COPY --from=build-env /workdir/build/csi-node-driver-registrar /csi-node-driver-registrar
COPY --from=build-env /workdir/build/csi-resizer /csi-resizer
COPY --from=build-env /workdir/build/livenessprobe /livenessprobe
COPY --from=build-env /workdir/LICENSE /LICENSE
ENTRYPOINT ["/hypertopolvm"]