Read baseimage from the dockerfile

Updated deploy.sh and build scripts
to read base image from the dockerfile

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-04-22 17:30:34 +05:30
committed by mergify[bot]
parent 697ed32778
commit bfa6064b4d
4 changed files with 14 additions and 8 deletions

View File

@ -1,6 +1,8 @@
ARG SRC_DIR="/go/src/github.com/ceph/ceph-csi/"
ARG GO_ARCH
FROM ceph/ceph:v15
ARG BASE_IMAGE=ceph/ceph:v15
FROM ${BASE_IMAGE} as builder
LABEL stage="build"
@ -35,7 +37,7 @@ COPY . ${SRC_DIR}
RUN make cephcsi
#-- Final container
FROM ceph/ceph:v15
FROM ${BASE_IMAGE}
ARG SRC_DIR
@ -44,6 +46,6 @@ LABEL maintainers="Ceph-CSI Authors" \
architecture=${GO_ARCH} \
description="Ceph-CSI Plugin"
COPY --from=0 ${SRC_DIR}/_output/cephcsi /usr/local/bin/cephcsi
COPY --from=builder ${SRC_DIR}/_output/cephcsi /usr/local/bin/cephcsi
ENTRYPOINT ["/usr/local/bin/cephcsi"]