mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
c4ceadd06a
fix docker build `cannot normalize nothing` Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
20 lines
313 B
Docker
20 lines
313 B
Docker
ARG WORK_DIR="/home/src"
|
|
ARG BASE_IMAGE="golang:1.16"
|
|
|
|
FROM ${BASE_IMAGE} as builder
|
|
|
|
ARG WORK_DIR
|
|
|
|
COPY . /home/src
|
|
WORKDIR ${WORK_DIR}
|
|
|
|
RUN go build -mod=vendor -o retest ./main.go
|
|
|
|
FROM scratch
|
|
|
|
ARG WORK_DIR
|
|
|
|
COPY --from=builder ${WORK_DIR}/retest /usr/local/bin/retest
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/retest" ]
|