-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (25 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ARG TERRAGRUNT_VERSION=0.55.19
ARG TERRAFORMER_VERSION=0.8.24
ARG TERRAFORMER_PROVIDER=all
FROM minidocks/base AS terraform
LABEL maintainer="Martin Hasoň <[email protected]>"
COPY --from=hashicorp/terraform /bin/terraform /bin/terraform
COPY rootfs /
CMD [ "terraform" ]
FROM terraform AS terragrunt
ARG TARGETARCH
ARG TERRAGRUNT_VERSION
RUN wget -O /usr/bin/terragrunt "https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_${TARGETARCH}"
FROM golang:alpine AS terraformer-build
RUN apk add --no-cache git
ARG TERRAFORMER_VERSION
ARG TERRAFORMER_PROVIDER
RUN wget -O tf.tar.gz "https://github.com/GoogleCloudPlatform/terraformer/archive/refs/tags/${TERRAFORMER_VERSION}.tar.gz" \
&& tar -xzf tf.tar.gz && mv terraformer*/ terraformer
WORKDIR /go/terraformer
RUN go mod download
RUN go run build/main.go "$TERRAFORMER_PROVIDER"
FROM terraform AS terraformer
ARG TERRAFORMER_PROVIDER
COPY --from=terraformer-build "/go/terraformer/terraformer-${TERRAFORMER_PROVIDER}" /usr/local/bin/terraformer
FROM terraform AS latest