-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (31 loc) · 908 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
IMAGE_REPO=joyme/kubeovs
IMAGE_TAG=dev
all: compile build push
.PHONY: compile
compile:
mkdir -p bin/
docker run \
-v $(PWD):/go/src/github.com/joyme123/kubeovs-l2 \
-w /go/src/github.com/joyme123/kubeovs-l2 \
golang:1.12 sh -c '\
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor \
-o bin/kubeovs-l2 \
github.com/joyme123/kubeovs-l2/cmd/cni'
docker run \
-v $(PWD):/go/src/github.com/joyme123/kubeovs-l2 \
-w /go/src/github.com/joyme123/kubeovs-l2 \
golang:1.12 sh -c '\
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor \
-o bin/kubeovsd \
github.com/joyme123/kubeovs-l2/cmd/kubeovsd'
.PHONY: build
build:
docker build -t $(IMAGE_REPO):$(IMAGE_TAG) .
docker tag $(IMAGE_REPO):$(IMAGE_TAG) $(IMAGE_REPO):latest
.PHONY: push
push:
docker push $(IMAGE_REPO):$(IMAGE_TAG)
docker push $(IMAGE_REPO):latest
.PHONY: vagrant
vagrant:
vagrant up