-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (28 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
38
39
40
41
include env_make
NS = benphegan
VERSION ?= latest
REPO = vagrantshadow
NAME=vagrantshadow
INSTANCE = default
.PHONY: build push shell run start stop rm release
build: vagrantshadow
docker build -t $(NS)/$(REPO):$(VERSION) .
push:
docker push $(NS)/$(REPO):$(VERSION)
shell:
docker run --rm --name $(NAME)-$(INSTANCE) -i -t $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION) /bin/bash
run:
docker run --rm --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION)
start:
docker run -d --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION)
stop:
docker stop $(NAME)-$(INSTANCE)
rm:
docker rm $(NAME)-$(INSTANCE)
release: build
make push -e VERSION=$(VERSION)
all: build
vagrantshadow: main.go
CGO_ENABLED=0 go build -a -ldflags '-s'
clean:
rm vagrantshadow