Merge "Grant access to docker build-args from Makefile"
This commit is contained in:
commit
a59b821ac9
7
Makefile
7
Makefile
|
@ -12,6 +12,8 @@ DOCKER_IMAGE_TAG ?= dev
|
|||
DOCKER_IMAGE ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
||||
DOCKER_MAKE_TARGET := build
|
||||
DOCKER_TARGET_STAGE ?= release
|
||||
DOCKER_BASE_IMAGE ?= docker.io/golang:1.12.6-stretch
|
||||
DOCKER_RELEASE_IMAGE ?= scratch
|
||||
|
||||
PKG := ./...
|
||||
TESTS := .
|
||||
|
@ -27,7 +29,10 @@ lint:
|
|||
|
||||
.PHONY: docker-image
|
||||
docker-image:
|
||||
@docker build . --build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) --tag $(DOCKER_IMAGE) --target $(DOCKER_TARGET_STAGE)
|
||||
@docker build . --tag $(DOCKER_IMAGE) --target $(DOCKER_TARGET_STAGE) \
|
||||
--build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) \
|
||||
--build-arg GO_IMAGE=$(DOCKER_BASE_IMAGE) \
|
||||
--build-arg RELEASE_IMAGE=$(DOCKER_RELEASE_IMAGE)
|
||||
|
||||
.PHONY: docker-image-unit-tests
|
||||
docker-image-unit-tests: DOCKER_MAKE_TARGET = unit-tests
|
||||
|
|
Loading…
Reference in New Issue