forked from tenox7/wrp
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·48 lines (36 loc) · 1.03 KB
/
Makefile
File metadata and controls
executable file
·48 lines (36 loc) · 1.03 KB
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
42
43
44
45
46
47
48
REPO ?= alb42/amifoxserver
TAG ?= latest
NAME ?= amifoxserver
all: wrp
wrp: wrp.go
export CGO_ENABLED=0
go build wrp.go
cross:
export CGO_ENABLED=0
GOOS=linux GOARCH=amd64 go build -a -o wrp-amd64-linux wrp.go
GOOS=freebsd GOARCH=amd64 go build -a -o wrp-amd64-freebsd wrp.go
GOOS=openbsd GOARCH=amd64 go build -a -o wrp-amd64-openbsd wrp.go
GOOS=darwin GOARCH=amd64 go build -a -o wrp-amd64-macos wrp.go
GOOS=darwin GOARCH=arm64 go build -a -o wrp-arm64-macos wrp.go
GOOS=windows GOARCH=amd64 go build -a -o wrp-amd64-windows.exe wrp.go
GOOS=linux GOARCH=arm go build -a -o wrp-arm-linux wrp.go
GOOS=linux GOARCH=arm64 go build -a -o wrp-arm64-linux wrp.go
build: wrp
docker build -t $(REPO):$(TAG) .
buildnc:
docker build --no-cache -t $(REPO):$(TAG) .
run:
docker run --rm -d -p 8080:8080 --name $(NAME) $(REPO):$(TAG)
stop:
docker kill $(NAME)
docker rm $(NAME)
push:
docker push $(REPO):$(TAG)
pull:
docker pull $(REPO):$(TAG)
logs:
docker logs $(NAME)
clean:
rm -rf wrp-* wrp
dockerclean:
-docker rmi -f $(REPO)