12345678910111213141516171819202122232425262728293031 |
- DIST=dist.tar.gz
- all: $(DIST)
- local:
- GOPATH=$(CURDIR)/deps:$(CURDIR) go get sampleapp/cmd/server
- GOPATH=$(CURDIR)/deps:$(CURDIR) go build -o bin/sampleapp sampleapp/cmd/server
- #builder
- $(DIST):
- docker build --rm -t sampleapp-build -f docker/Dockerfile.build .
- docker run sampleapp-build > $(DIST)
- # Distribution docker, small, clean
- dist: $(DIST)
- docker build -t sampleapp -f docker/Dockerfile.dist .
- clean:
- rm $(DIST)
- distclean:
- rm -rf bin
- rm -rf pkg
- rm -rf deps
- .PHONY: clean dist all
|