TykTechnologies / tyk-gateway-docker

Docker compose deployment to run Tyk OSS Gateway
96 stars 80 forks source link

Twice smaller image, faster build, more secure #11

Closed excieve closed 6 years ago

excieve commented 6 years ago

Changing base image to debian:jessie-slim as it's twice smaller than ubuntu:14.04, while having a lot less vulnerabilities according to Docker Hub. This is about the same level of packages version as Ubuntu 14.04 too.

Replacing manual protobuf build with downloading binary "wheels" brings the largest benefits in terms of image size, complexity and time to build.

There are some more small cleanups and improvements. In general the image is now about twice smaller and takes minutes to build from scratch.

excieve commented 6 years ago
$ docker images|grep tyk-gate
tykio/tyk-gateway-upd                           latest              40e8f69f68f4        21 seconds ago      325MB
tykio/tyk-gateway                               latest              09c6593a4cfe        45 minutes ago      736MB

Not sure there's a way to go smaller than that without Alpine as more than half of the 325MB are Python, Lua, their dependencies and our dependencies for those. The rest is base system and the gateway itself.

excieve commented 6 years ago

@buger Could you please take a look at this when you have a moment? It's similar to the work done on the hybrid image.

For some reason GH shows for me that there are conflicts but I believe I've resolved them...