-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 704 Bytes
/
Dockerfile
File metadata and controls
23 lines (18 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG TERRAFORM_VERSION=latest
FROM hashicorp/terraform:$TERRAFORM_VERSION AS terraform
FROM alpine:3.21 AS opentofu
ARG OPENTOFU_VERSION=latest
ADD https://get.opentofu.org/install-opentofu.sh /install-opentofu.sh
RUN chmod +x /install-opentofu.sh
RUN apk add gpg gpg-agent
RUN ./install-opentofu.sh --install-method standalone --opentofu-version $OPENTOFU_VERSION --install-path /usr/local/bin --symlink-path -
FROM golang:1.24-alpine3.21
RUN apk --no-cache add make git bash
COPY --from=terraform /bin/terraform /usr/local/bin/
COPY --from=opentofu /usr/local/bin/tofu /usr/local/bin/
WORKDIR /work
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make install
ENTRYPOINT ["./entrypoint.sh"]