Commit e5b578a
Trevor O
Fix make build-docker-local
This commit addresses a couple problems with the Dockerfile which was
resulting in a failed build. The likely culprit of this not being caught
earlier was some cached images. This does two things
1. It removes unnecessary references to things that aren't being used
any more. The ENV setting was removed in a previous commit, but not the
reference of it later in the Dockerfile. If this is in error please let
me know!
2. The go modules are cached in a layer as these are much less likely to
change between build runs than the source code itself. The technique is
simple enough; just copy the files in a separate COPY and run `go mod
download`. This reduces the hydrated build time (previous layers cached)
from 2m35s on average (3 runs) to 34s on average (3 runs).1 parent dee9499 commit e5b578a
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
| |||
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| 23 | + | |
| 24 | + | |
27 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments