Replace docker-build script with multi-stage build

This commit is contained in:
Tobias Furuholm
2017-09-18 08:56:39 +02:00
parent 64c97c7308
commit b6c3074ba0
4 changed files with 11 additions and 32 deletions

View File

@@ -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: