Skip to content
Snippets Groups Projects
Unverified Commit a653181e authored by Michael Manganiello's avatar Michael Manganiello Committed by GitHub
Browse files

Improve Docker layer caching for Go dependencies (#560)

Running `go mod download` before copying the entire project to the
Docker image avoids dependencies from being re-downloaded every time any
file is modified, and `docker build` runs again.

This follows the steps detailed in the official Docker guide for Go
images:
https://docs.docker.com/language/golang/build-images/#create-a-dockerfile-for-the-application

Also, `GO111MODULE` doesn't make any difference for the supported
Go versions, so it can be removed from the Dockerfile.
parent bafbf0c1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment