-
-
Notifications
You must be signed in to change notification settings - Fork 965
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a Dockerfile that creates a terragrunt image
- Loading branch information
1 parent
9362e01
commit c90d385
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM golang:1.16.3-alpine as builder | ||
|
||
RUN apk add --update --no-cache make git | ||
|
||
WORKDIR /go/src/terragrunt | ||
|
||
# Download modules in a separate layer so docker caches it, to reduce build time | ||
# when modules have not changed. | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download -x | ||
|
||
COPY . . | ||
|
||
RUN make build | ||
|
||
### | ||
|
||
FROM alpine:latest | ||
|
||
COPY --from=builder /go/src/terragrunt/terragrunt /usr/local/bin/ | ||
|
||
ENTRYPOINT terragrunt |