Build a docker container

Use debian/distroless (glibc) as a base which in general gives
slightly higher performance than alpine (musl) while trading
off container size (about 10mb).

The build phase makes the assumption that any capnproto-files
are pre-processed before building in-docker.
This commit is contained in:
Johan Bergström
2019-04-29 17:25:34 -04:00
committed by Silver
parent acd17f6ab6
commit d3f9aa2ae7
2 changed files with 16 additions and 0 deletions

View File

@@ -31,6 +31,10 @@ clean:
cloudflared: tunnel-deps
go build -v $(VERSION_FLAGS) $(IMPORT_PATH)/cmd/cloudflared
.PHONY: container
container:
docker build -t cloudflare/cloudflared:"$(VERSION)" .
.PHONY: test
test: vet
go test -v -race $(VERSION_FLAGS) ./...