-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 1.02 KB
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
FROM golang:alpine as Build
ENV TERRAFORM_VERSION=0.11.13
ENV DDCLOUD_VERSION=2.0
RUN apk add --update git bash openssh make
ENV TF_DEV=true
ENV TF_RELEASE=true
WORKDIR $GOPATH/src/github.com/hashicorp/terraform
RUN git clone https://github.com/hashicorp/terraform.git ./ && \
git checkout v${TERRAFORM_VERSION} && \
/bin/bash scripts/build.sh && \
ls -l /bin
WORKDIR $GOPATH/src/github.com/DimensionDataResearch/dd-cloud-compute-terraform
RUN git clone --recurse-submodules https://github.com/DimensionDataResearch/dd-cloud-compute-terraform.git ./ && \
git checkout release/v${DDCLOUD_VERSION} && \
git pull --recurse-submodules && \
git submodule update --remote --recursive && \
go get github.com/pkg/errors && \
go get golang.org/x/crypto/pkcs12 && \
make dev
FROM golang:alpine
COPY --from=build $GOPATH/bin/terraform /bin
COPY --from=build $GOPATH/src/github.com/DimensionDataResearch/dd-cloud-compute-terraform/_bin/terraform-provider-ddcloud /bin
WORKDIR $GOPATH
ENTRYPOINT ["terraform"]