Skip to content

Instantly share code, notes, and snippets.

@kyeah
Last active November 30, 2018 02:11
Show Gist options
  • Save kyeah/dc48c08973f280323b1e03470f94bf2c to your computer and use it in GitHub Desktop.
Save kyeah/dc48c08973f280323b1e03470f94bf2c to your computer and use it in GitHub Desktop.
Dockerfile for navapbc/terraform-newrelic
FROM golang:alpine as tf-nr-provider
ENV GOPATH=/go
RUN apk add git make bash
RUN mkdir -p $GOPATH/src/github.com/terraform-providers
WORKDIR $GOPATH/src/github.com/terraform-providers
RUN git clone https://github.com/kyeah/terraform-provider-newrelic
WORKDIR $GOPATH/src/github.com/terraform-providers/terraform-provider-newrelic
RUN git checkout kev-synthetics-monitor
RUN go get -d -v ./...
RUN make build
FROM hashicorp/terraform:0.10.8
COPY --from=tf-nr-provider /go/bin/terraform-provider-newrelic /util/terraform-provider-newrelic
COPY ./terraform-with-synthetics /util/terraform-with-synthetics
ENTRYPOINT ["/util/terraform-with-synthetics"]
#!/bin/sh
set -xe
mkdir -p $TF_DIR/.terraform/plugins/linux_amd64/
cp /util/terraform-provider-newrelic $TF_DIR/.terraform/plugins/linux_amd64
/bin/terraform $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment