-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (25 loc) · 824 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
NS = gwihlidal
VERSION ?= 11
REPO = docker-shader
NAME = docker-shader
INSTANCE = default
.PHONY: build push shell run start stop rm release cloud-build
build:
docker build -t $(NS)/$(REPO):$(VERSION) .
push: build
docker push $(NS)/$(REPO):$(VERSION)
shell: build
docker run --rm --name $(NAME)-$(INSTANCE) --entrypoint=/bin/sh -i -t $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION)
run: build
docker run --rm --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION)
start: build
docker run -d --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION)
release: build
make push -e VERSION=$(VERSION)
stop:
docker stop $(NAME)-$(INSTANCE)
rm:
docker rm $(NAME)-$(INSTANCE)
cloud-build:
gcloud container builds submit . --config=cloudbuild.yaml
default: build