-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 727 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 727 Bytes
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
.PHONY: build push run
REPO := sleepymole/corplink
DATE := $(shell date +%Y%m%d)
SHA := $(shell git rev-parse --short HEAD)
DIRTY := $(shell git diff --quiet && git diff --cached --quiet || echo "-dirty")
TAG := v$(DATE)-$(SHA)${DIRTY}
all:
docker build --platform=linux/amd64,linux/arm64 -t $(REPO):latest .
docker tag $(REPO):latest $(REPO):$(TAG)
build:
docker build -t $(REPO):latest .
docker tag $(REPO):latest $(REPO):$(TAG)
push:
docker push $(REPO):latest
docker push $(REPO):$(TAG)
run:
docker run -d \
--name=corplink \
--hostname=ubuntu \
--device=/dev/net/tun \
--cap-add=NET_ADMIN \
--shm-size=512m \
-p 6901:6901 \
-p 8888:8118 \
-p 1088:1080 \
-e VNC_PW=password \
$(REPO):$(TAG)