travisjeffery / jocko

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)

Home Page:https://twitter.com/travisjeffery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add fully static linked build target to makefile and refactor Dockerfile and docker-compose.yml

yglcode opened this issue · comments

. add build-static target to Makefile to build fully static linked binary.
. refactor Dockerfile, since using build-static, we don't need alpine/muslc toolchain which IMHO mostly solve cgo/glibc dependence. For multistage dockerfile, use standard golang image for first build stage and "scratch" or "busybox" as base for final deploy which results an image half size of original alpine based image.
. refactor docker-compose.yml with more consistent image names.

I'm gonna leave it for now, we can optimize later. We're already using alpine and the builder pattern so it's not like the images that big.