Skip to content

Commit 931c8ee

Browse files
committed
terraform-alpine: Install terraform into $PATH
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).
1 parent 00bf783 commit 931c8ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildah-from-alpine/terraform-alpine.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ctr=$(buildah from alpine) || (echo "Must be root to execute buildah" && exit 1)
99
mnt=`buildah mount $ctr` || (echo "Must be root to execute buildah" && exit 1)
1010
wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
1111
unzip terraform_0.11.7_linux_amd64.zip
12-
cp terraform $mnt || exit 1
12+
cp terraform "${mnt}/usr/bin" || exit 1
1313
buildah unmount $ctr
1414
buildah config $ctr
1515
buildah commit $ctr terraform-alpine:v0.11.7
1616
set +x
17-
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"
17+
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"
1818
echo "to cleanup run 'podman stop [containerid from podman run]; podman rm [containerid from podman run]'"
1919
echo "to push to docker-daemon run 'buildah push [imageID] docker-daemon:terraform-alpine:v0.11.7'"

0 commit comments

Comments
 (0)