From 476bca371759b12465451075a636b3d8d7006d6b Mon Sep 17 00:00:00 2001 From: max furman Date: Mon, 3 Aug 2020 20:45:51 -0700 Subject: [PATCH] Add make docker-dev building and testing locally. --- make/docker.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/make/docker.mk b/make/docker.mk index 9a9e3c6d..da41fd60 100644 --- a/make/docker.mk +++ b/make/docker.mk @@ -65,3 +65,18 @@ docker-release: docker-prepare docker-login $(call DOCKER_BUILDX,$(VERSION),--push) .PHONY: docker-branch docker-master docker-release-candidate docker-release + +# XXX We put the output for the build in 'output' so we don't mess with how we +# do rule overriding from the base Makefile (if you name it 'build' it messes up +# the wildcarding). +DOCKER_OUTPUT=$(OUTPUT_ROOT)docker/ + +DOCKER_MAKE=V=$V GOOS_OVERRIDE='GOOS=linux GOARCH=amd64' PREFIX=$(1) make $(1)bin/$(BINNAME) +DOCKER_BUILD=$Q docker build -t $(DOCKER_IMAGE_NAME):latest -f docker/Dockerfile.step-ca --build-arg BINPATH=$(DOCKER_OUTPUT)bin/$(BINNAME) . + +docker-dev: docker/Dockerfile.step-ca + mkdir -p $(DOCKER_OUTPUT) + $(call DOCKER_MAKE,$(DOCKER_OUTPUT),step-ca) + $(call DOCKER_BUILD) + +.PHONY: docker-dev