2020-01-09 20:50:27 +00:00
|
|
|
# ARGs
|
|
|
|
# ==================================
|
|
|
|
ARG BASE_IMAGE
|
|
|
|
ARG BUILD_IMAGE
|
|
|
|
ARG EXECUTABLE
|
|
|
|
ARG EXECUTABLE_TARGET
|
|
|
|
ARG GOPROXY
|
|
|
|
ARG GOPRIVATE
|
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
# BUILD
|
|
|
|
# ==================================
|
|
|
|
FROM ${BUILD_IMAGE} AS build
|
|
|
|
COPY . /workspace
|
|
|
|
RUN make ${EXECUTABLE_TARGET} VERSION=${VERSION} GOPROXY=${GOPROXY} GOPRIVATE=${GOPRIVATE}
|
|
|
|
|
|
|
|
# TARGET
|
|
|
|
# ==================================
|
|
|
|
FROM ${BASE_IMAGE}
|
|
|
|
COPY --from=build /workspace/${EXECUTABLE_TARGET} /usr/bin/${EXECUTABLE}
|