2020-01-26 14:52:36 +00:00
|
|
|
# ARGs
|
|
|
|
# ==================================
|
2019-11-12 20:42:16 +00:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
ARG BUILD_IMAGE
|
|
|
|
ARG EXECUTABLE_TARGET
|
2020-01-26 14:52:36 +00:00
|
|
|
ARG GOPROXY
|
|
|
|
ARG GOPRIVATE
|
2019-11-12 20:42:16 +00:00
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
# BUILD
|
|
|
|
# ==============================================================================
|
|
|
|
FROM ${BUILD_IMAGE} AS build-env
|
2019-09-16 19:36:27 +00:00
|
|
|
|
|
|
|
ADD ./ /workspace
|
|
|
|
|
2019-11-12 20:42:16 +00:00
|
|
|
RUN make clean ${EXECUTABLE_TARGET} GOPROXY=${GOPROXY}
|
2019-09-16 19:36:27 +00:00
|
|
|
|
2019-11-12 20:42:16 +00:00
|
|
|
# TARGET
|
|
|
|
# ==============================================================================
|
|
|
|
FROM ${BASE_IMAGE}
|
|
|
|
COPY --from=build-env /workspace/${EXECUTABLE_TARGET} /usr/bin/dhdu
|
|
|
|
RUN chmod +x /usr/bin/dhdu
|
2019-09-24 12:56:49 +00:00
|
|
|
ENTRYPOINT [ "/usr/bin/dhdu" ]
|