Use Alpine and Clean Up Dockerfile#212
Use Alpine and Clean Up Dockerfile#212decaffeinatedio wants to merge 2 commits intoprebid:masterfrom
Conversation
|
I'm using a simpler dockerfile, also go vendoring is enabled to prevent modules download at the compile stage every time |
|
@linux019 I think your Dockerfile is even cleaner ( |
|
Sorry for the delay here. We finally got around to discussing this in the biweekly PBS-Go Engineering subcommittee meeting. Prebid Server and Cache used Alpine as the base image several years ago before I was part of Prebid. The engineers who were around at that time believe that the switch was made to Ubuntu trading off resource utilization for ease of debugging with the belief being that the resource utilization sacrifice was minimal. Given this fact and that some prominent Prebid members still run with Ubuntu as the base image, we agreed that we should keep Ubuntu as the default base image and continue to publish Ubuntu images we build as part of the release process to Docker Hub. However, we agreed that it would be sensible to provide base image alternatives (e.g. |
I ran a quick test to deploy Prebid Cache + Redis with Dokku on a random VPS and noticed a number of issues with the Dockerfile. I think this proposed PR will make things faster, cleaner and more secure.
FWIW, this also shrinks the (local) image size from ~129MB to ~29MB.
Major changes: