blob: ddd7c719e35626a9175c810f53ac21f6696f8c97 [file] [log] [blame]
FROM golang:1.15-alpine
RUN apk update && apk add bash git unzip curl
# install tfswitch
RUN go get github.com/warrensbox/terraform-switcher
# initialise go program
RUN mkdir ~/example
COPY main.go ~/example/
WORKDIR ~/example
RUN go mod init github.com/kmoe/example
# run test program without any terraform version installed
RUN go run main.go
# install 0.13.4 via tfswitch
RUN terraform-switcher 0.13.4
RUN go run main.go