forked from Seagate/seagate-exos-x-csi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.local
45 lines (32 loc) · 1.04 KB
/
Dockerfile.local
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
38
39
40
41
42
43
44
45
FROM golang:1.16-buster AS build
RUN apt update \
&& apt install -y make git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY ./go.* ./
COPY cmd cmd
COPY pkg pkg
COPY Makefile ./
ARG version
RUN echo "package common\nconst Version = \"${version}\"" > ./pkg/common/version.go
COPY seagate-exos-x-csi-controller /
COPY seagate-exos-x-csi-node /
RUN ls -l /
###########################################
FROM ubuntu:18.04
RUN apt update \
&& apt dist-upgrade -y \
&& apt install -y dosfstools e2fsprogs xfsprogs jfsutils libisns0 open-iscsi kmod multipath-tools \
&& rm -rf /var/lib/apt/lists/*
COPY /seagate-exos-x-csi-controller /usr/local/bin/
COPY /seagate-exos-x-csi-node /usr/local/bin/
RUN ls -l /usr/local/bin/
RUN ls -l /usr/local/bin/seagate-exos-x-csi-controller
ENV PATH="${PATH}:/lib/udev"
CMD [ "/usr/local/bin/seagate-exos-x-csi-controller" ]
ARG version
ARG vcs_ref
ARG build_date
LABEL org.opencontainers.image.version="$version" \
org.opencontainers.image.revision="$vcs_ref" \
org.opencontainers.image.created="$build_date"