diff --git a/Dockerfile b/Dockerfile index 084b144..40b3c96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM golang:alpine AS deps +ARG MONITORD_IMAGE + WORKDIR /app COPY go.mod go.sum ./ RUN sed -i '/replace/d' go.mod @@ -19,7 +21,7 @@ COPY . . RUN go build #---------------------------------------------------------------------------------------------- -FROM oc-monitord:latest AS monitord +FROM ${MONITORD_IMAGE:-oc-monitord}:latest AS monitord FROM scratch diff --git a/Makefile b/Makefile index 31a970e..c567302 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ clean: rm -rf oc-schedulerd docker: - DOCKER_BUILDKIT=1 docker build -t oc/oc-schedulerd:0.0.1 -f Dockerfile . + DOCKER_BUILDKIT=1 docker build -t oc/oc-schedulerd:0.0.1 -f Dockerfile . --build-arg MONITORD_IMAGE=oc/oc-monitord docker tag oc/oc-schedulerd:0.0.1 oc/oc-schedulerd:latest publish-kind: