2020-02-10 10:54:36 +00:00
|
|
|
BIN=bottin
|
2020-02-13 13:14:27 +00:00
|
|
|
SRC=main.go ssha.go util.go acl.go read.go write.go memberof.go
|
2022-02-10 16:23:43 +00:00
|
|
|
DOCKER=192.168.6.10:5000/bottin
|
2020-01-26 20:57:27 +00:00
|
|
|
|
2020-02-10 10:54:36 +00:00
|
|
|
all: $(BIN)
|
|
|
|
|
|
|
|
$(BIN): $(SRC)
|
2020-01-26 20:57:27 +00:00
|
|
|
go get -d -v
|
2020-02-10 10:54:36 +00:00
|
|
|
go build -v -o $(BIN)
|
2020-01-26 20:57:27 +00:00
|
|
|
|
2020-02-10 10:54:36 +00:00
|
|
|
$(BIN).static: $(SRC)
|
2020-01-26 21:30:05 +00:00
|
|
|
go get -d -v
|
2020-02-10 10:54:36 +00:00
|
|
|
CGO_ENABLED=0 GOOS=linux go build -a -v -o $(BIN).static
|
2020-01-26 21:30:05 +00:00
|
|
|
|
2020-02-10 10:54:36 +00:00
|
|
|
docker: $(BIN).static
|
2022-02-10 16:23:43 +00:00
|
|
|
docker build -t $(DOCKER):latest .
|
|
|
|
# docker push $(DOCKER):$(TAG)
|
|
|
|
# docker tag $(DOCKER):$(TAG) $(DOCKER):latest
|
2020-02-10 10:54:36 +00:00
|
|
|
docker push $(DOCKER):latest
|