-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
63 lines (41 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM golang:alpine
MAINTAINER Jason McVetta <[email protected]>
# Update system packages
RUN apk update && apk upgrade --no-cache
# Build folder
# Build dependencies
RUN apk add --no-cache \
bash \
curl \
git \
make \
unzip \
vim
# Enable VI-keys
RUN echo "set -o vi" >> ~/.bashrc
# Install Go modules
WORKDIR /srv/terraform-provider-rollbar
COPY go.mod go.sum ./
RUN go mod download -x
# Install Terraform
# Versions 0.12.x and 0.13.x are supported
ARG version=0.13.5
RUN curl https://releases.hashicorp.com/terraform/${version}/terraform_${version}_linux_amd64.zip -o /tmp/terraform.zip
RUN unzip /tmp/terraform.zip -d /usr/local/bin/
# Build and install provider
COPY Makefile main.go ./
COPY client client
COPY rollbar rollbar
RUN make build
RUN make install
RUN make install012
# Terraform configuration
RUN mkdir example
COPY example/*.tf example/*.override example/
WORKDIR example/
# Initialize provider
RUN terraform init
# Enable trace logging
#ENV TF_LOG=TRACE
# Terraform plan
ENTRYPOINT ["terraform"]