22 lines
480 B
Docker
22 lines
480 B
Docker
# 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
|
|
ENV GOPROXY=${GOPROXY}
|
|
ENV GOPRIVATE=${GOPRIVATE}
|
|
RUN make ${EXECUTABLE_TARGET} VERSION=${VERSION}
|
|
|
|
# TARGET
|
|
# ==================================
|
|
FROM ${BASE_IMAGE}
|
|
COPY --from=build /workspace/${EXECUTABLE_TARGET} /usr/bin/${EXECUTABLE} |