blob: 4682ad19d6af36bce1d524eefd94795d3d072fcc [file] [log] [blame]
# Copyright 2017 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
VERSION=latest
DOCKER_IMAGE_build0=build0/maintnerd:latest
DOCKER_CTR_build0=maintnerd-build0
build0: *.go Dockerfile.0
docker build --force-rm -f Dockerfile.0 --tag=$(DOCKER_IMAGE_build0) ../..
maintnerd: build0
docker create --name $(DOCKER_CTR_build0) $(DOCKER_IMAGE_build0)
docker cp $(DOCKER_CTR_build0):/go/bin/$@ $@
docker rm $(DOCKER_CTR_build0)
ca-certificates.crt:
docker create --name $(DOCKER_CTR_build0) $(DOCKER_IMAGE_build0)
docker cp $(DOCKER_CTR_build0):/etc/ssl/certs/$@ $@
docker rm $(DOCKER_CTR_build0)
docker-prod: Dockerfile maintnerd ca-certificates.crt
docker build --force-rm --tag=gcr.io/symbolic-datum-552/maintnerd:$(VERSION) .
docker-dev: Dockerfile maintnerd ca-certificates.crt
docker build --force-rm --tag=gcr.io/go-dashboard-dev/maintnerd:latest .
push-prod: docker-prod
gcloud docker -- push gcr.io/symbolic-datum-552/maintnerd:$(VERSION)
push-dev: docker-dev
gcloud docker -- push gcr.io/go-dashboard-dev/maintnerd:latest
.PHONY: clean
clean:
$(RM) maintnerd
$(RM) ca-certificates.crt