PKGBUILD/Dockerfile

22 lines
480 B
Docker
Raw Permalink Normal View History

# 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}
# TARGET
# ==================================
FROM ${BASE_IMAGE}
COPY --from=build /workspace/${EXECUTABLE_TARGET} /usr/bin/${EXECUTABLE}