diff --git a/Dockerfile b/Dockerfile index af87f6d4824..e9eb57ffdae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,18 @@ FROM golang:1.22 AS build +ARG REACHABILITY_OVERRIDE_PUBLIC=false +ARG BATCHFACTOR_OVERRIDE_PUBLIC=5 + WORKDIR /src # enable modules caching in separate layer COPY go.mod go.sum ./ RUN go mod download COPY . ./ -RUN make binary +# Run make binary with specified arguments +RUN make binary \ + REACHABILITY_OVERRIDE_PUBLIC=$REACHABILITY_OVERRIDE_PUBLIC \ + BATCHFACTOR_OVERRIDE_PUBLIC=$BATCHFACTOR_OVERRIDE_PUBLIC FROM debian:12.4-slim diff --git a/Makefile b/Makefile index c66b5ddb0cc..c0f7a3ab8c4 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,10 @@ build: .PHONY: docker-build docker-build: - docker build -t $(IMAGE) . --no-cache + docker build \ + --build-arg REACHABILITY_OVERRIDE_PUBLIC=$(REACHABILITY_OVERRIDE_PUBLIC) \ + --build-arg BATCHFACTOR_OVERRIDE_PUBLIC=$(BATCHFACTOR_OVERRIDE_PUBLIC) \ + -t $(IMAGE) . --no-cache .PHONY: githooks githooks: