Golangci-lint: Reduce Docker image size by switching to alpine

Created on 2 May 2019  路  1Comment  路  Source: golangci/golangci-lint

I notice that the Docker image uses golang:1.12. It is based on Debian Stretch and is ~296 MB. How about switching to use 1.12-alpine which is 128 MB? There would be a 168 MB saving which would be a nice improvement to those of use who are using the Docker image for CI (less to download => faster CI step execution).

docker enhancement good first issue

Most helpful comment

I agree with @JensRantil

Aside from that, what about using ENTRYPOINT in the Dockerfile instead of CMD? The usual convention for this kind of docker images is to call the tool passing the usual set of params to docker run without having to write the name of the command again.

>All comments

I agree with @JensRantil

Aside from that, what about using ENTRYPOINT in the Dockerfile instead of CMD? The usual convention for this kind of docker images is to call the tool passing the usual set of params to docker run without having to write the name of the command again.

Was this page helpful?
0 / 5 - 0 ratings