Replace docker-build script with multi-stage build
This commit is contained in:
14
Makefile
14
Makefile
@@ -9,8 +9,6 @@ DOCKER_REPO=quay.io/coreos/dex
|
||||
DOCKER_IMAGE=$(DOCKER_REPO):$(VERSION)
|
||||
|
||||
$( shell mkdir -p bin )
|
||||
$( shell mkdir -p _output/images )
|
||||
$( shell mkdir -p _output/bin )
|
||||
|
||||
user=$(shell id -u -n)
|
||||
group=$(shell id -g -n)
|
||||
@@ -58,12 +56,8 @@ lint:
|
||||
golint -set_exit_status $$package $$i || exit 1; \
|
||||
done
|
||||
|
||||
_output/bin/dex:
|
||||
@./scripts/docker-build
|
||||
@sudo chown $(user):$(group) _output/bin/dex
|
||||
|
||||
.PHONY: docker-image
|
||||
docker-image: clean-release _output/bin/dex
|
||||
docker-image:
|
||||
@sudo docker build -t $(DOCKER_IMAGE) .
|
||||
|
||||
.PHONY: proto
|
||||
@@ -85,13 +79,9 @@ bin/protoc-gen-go:
|
||||
check-go-version:
|
||||
@./scripts/check-go-version
|
||||
|
||||
clean: clean-release
|
||||
clean:
|
||||
@rm -rf bin/
|
||||
|
||||
.PHONY: clean-release
|
||||
clean-release:
|
||||
@rm -rf _output/
|
||||
|
||||
testall: testrace vet fmt lint
|
||||
|
||||
FORCE:
|
||||
|
Reference in New Issue
Block a user