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
|
2021-04-09 15:11:51 +00:00
|
|
|
ENV GOPROXY=${GOPROXY}
|
|
|
|
ENV GOPRIVATE=${GOPRIVATE}
|
|
|
|
RUN make ${EXECUTABLE_TARGET} VERSION=${VERSION}
|
2020-01-09 20:50:27 +00:00
|
|
|
|
|
|
|
# TARGET
|
|
|
|
# ==================================
|
|
|
|
FROM ${BASE_IMAGE}
|
|
|
|
COPY --from=build /workspace/${EXECUTABLE_TARGET} /usr/bin/${EXECUTABLE}
|