-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (21 loc) · 984 Bytes
/
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
FROM golang:alpine
MAINTAINER "Priyanka Sood <[email protected]>"
ENV TERRAFORM_VERSION=0.11.10
ENV USER root
RUN mkdir -p /usr/local/terraform
RUN apk update && \
apk add curl jq python3 bash ca-certificates git openssl unzip wget && \
cd /tmp && \
wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/terraform/
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin
WORKDIR /go/src/github.com/HewlettPackard/terraform-provider-oneview
COPY . /go/src/github.com/HewlettPackard/terraform-provider-oneview
RUN cd $GOPATH/src/github.com/HewlettPackard/terraform-provider-oneview
RUN go build -o $GOPATH/bin/terraform-provider-oneview
RUN mv $GOPATH/bin/terraform-provider-oneview /usr/local/terraform/
RUN go get github.com/kardianos/govendor
ENV PATH $PATH:/usr/local/terraform/