-
Notifications
You must be signed in to change notification settings - Fork 94
Description
We need to do some more work in order to reduce the docker image size for the gateway.
At the moment, it stands at 116mb
-
We currently ship with 3 tyk binaries. Each binary is approx 32mb -
py,grpc&lua. These should be separated into separate builds. e.g.tyk-gateway:py-2.7.3,tyk-gateway:grpc-2.7.3ortyk-gateway:lua-2.7.3 -
Currently we ship with base image
debian:jessie-slim(30mb). We could look into using alpine which is a 2mb base image. If we require glibchttps://github.com/sgerrand/alpine-pkg-glibcor if we may be better off using musl binaries. -
Strip debug info from compiled binaries using linker flags
-s -w.go build -ldflags="-s -w" .which shaves off circa 10mb from each binary. -
Investigate using UPX to further pack the binaries - bringing binary size down to approx 5mb. https://github.com/upx/upx