-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
18 lines (13 loc) · 615 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
APP_NAME = aurora-go
GIT_HEAD = `git rev-parse --short HEAD`
ID_RSA = $(shell cat ~/.ssh/id_rsa | tr '\n' '_')
build-ash:
docker build --build-arg id_rsa='$(ID_RSA)' -f Dockerfile.build -t aurora-builder .
ash: build-ash
docker run -v "$$(pwd):/go/src/github.com/auroraapi/$(APP_NAME)" -it aurora-builder
check: build-ash
docker run -v "$$(pwd):/go/src/github.com/auroraapi/$(APP_NAME)" -it aurora-builder /bin/ash -c "cd /go/src/github.com/auroraapi/$(APP_NAME) && go build . && gofmt -w ."
build:
docker build --build-arg id_rsa='$(ID_RSA)' -t $(APP_NAME) .
run:
docker run --net=host -it $(APP_NAME)