1. 程式人生 > 實用技巧 >Create the smallest and secured golang docker image based on scratch

Create the smallest and secured golang docker image based on scratch

Create the smallest and secured golang docker image based onscratch

原文:https://medium.com/@chemidy/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-475

When we are building a docker Image, the first idea is using the default official image.

FROM golang
FROM nginx
FROM openjdk

There is an

official Docker image for Go.

$ docker image list
golang    latest       1c1309ff8e0d        10 days ago         779MB

Ouch 779 MB just for an empty image… this is crazy