-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 963 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 963 Bytes
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
FROM alpine:latest
MAINTAINER Greg Trahair <greg@monkeyswithbuttons.com>
# Set the version you want
ENV TERRAFORM_VERSION=0.10.6
# Disable Checkpoint
ENV CHECKPOINT_DISABLE=1
# Install packages we need
RUN apk add --no-cache --update git wget make openssh-client
# Get the terraform package and checksum file
ADD https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip ./
ADD https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS ./
# Remove all but the linux_amd64 sha256sum from the checksum file
RUN sed -i "/terraform_${TERRAFORM_VERSION}_linux_amd64.zip/!d" terraform_${TERRAFORM_VERSION}_SHA256SUMS
# Verify the checksum
RUN sha256sum -cs terraform_${TERRAFORM_VERSION}_SHA256SUMS
# Extract the binary and remove the archive
RUN unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /bin
RUN rm -f terraform_${TERRAFORM_VERSION}_linux_amd64.zip