mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 23:00:19 +00:00
fac3ef01c6
It seems that building the `retest` action makes it consume shared libraries that are not part of the `scratch` base container layer. By using the golang:1.16 container image as a base, all required shared libraries are available. Signed-off-by: Niels de Vos <ndevos@redhat.com>
20 lines
319 B
Docker
20 lines
319 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 ${BASE_IMAGE}
|
|
|
|
ARG WORK_DIR
|
|
|
|
COPY --from=builder ${WORK_DIR}/retest /usr/local/bin/retest
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/retest" ]
|