Skip to content

Commit

Permalink
terraform-alpine: Install terraform into $PATH
Browse files Browse the repository at this point in the history
Installing it without the leading slash makes invoking terraform via
this container more like invoking terraform installed locally on the
host system (e.g. via a package manager).
  • Loading branch information
wking committed Aug 16, 2018
1 parent 00bf783 commit 931c8ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildah-from-alpine/terraform-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ctr=$(buildah from alpine) || (echo "Must be root to execute buildah" && exit 1)
mnt=`buildah mount $ctr` || (echo "Must be root to execute buildah" && exit 1)
wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
unzip terraform_0.11.7_linux_amd64.zip
cp terraform $mnt || exit 1
cp terraform "${mnt}/usr/bin" || exit 1
buildah unmount $ctr
buildah config $ctr
buildah commit $ctr terraform-alpine:v0.11.7
set +x
echo "run 'podman run -v "$PWD":"$PWD":ro -v /tmp:/tmp:rw terraform-alpine:v0.11.7 /terraform fmt -list -check -write=false' to terraform fmt source"
echo "run 'podman run -v "$PWD":"$PWD":ro -v /tmp:/tmp:rw terraform-alpine:v0.11.7 terraform fmt -list -check -write=false' to terraform fmt source"
echo "to cleanup run 'podman stop [containerid from podman run]; podman rm [containerid from podman run]'"
echo "to push to docker-daemon run 'buildah push [imageID] docker-daemon:terraform-alpine:v0.11.7'"

0 comments on commit 931c8ee

Please sign in to comment.