Some amazing Docker images to work with terraform Out Of The Box
Create a new Pull Request with the necessary changes. After being reviewed and merged a new tag will be generated, creating a new Release and publishing the new version.
$ git tag -a v1.0.9 -m "This is my new amazing version"
$ git push origin v1.0.9
$ docker build --build-arg VERSION=1.0.9 --build-arg BUILD_DATE="$(date +%Y/%m/%dT%H:%M:%S)" -t terraform .
$ docker tag terraform lcaparros/terraform:1.0.9
$ docker push lcaparros/terraform:1.0.9
It is necessary to share a volume to the current directory to make the necessary Terraform files available for the Docker container (use the /files
volume in the container). A good way to use this image could be to create a new alias in your bash_profile file:
alias terraform='docker run --rm -it -v $(pwd):/fileslcaparros/terraform:1.0.9'
Now you could just type terraform
in the CLI and it will work as the real terraform binary.