/docker-terraform-and-ansible

Dockerfile to build both terraform and Ansible together. Useful for gitlab runner, etc

Primary LanguageDockerfile

Terraform and Ansible Container

Just a simple container for a personal project that builds Ansible and Terraform together. This was built for a gitlab runner project/pipeline I needed.

Containers made from this repo on dockerhub

  • nickmaccarthy/terraform-0.11.10-ansible-runner-1.3.4:2.8.5 - Contains both Terraform 0.11.10, Ansible Runner 1.3.4 and Ansible 2.8.5. Also inclused the hvac, certifi, boto, botocore, and boto3 pip modules

Deployment

  • docker build -t terraform-<tf_version>-ansible-runner-<runner_version>:<ansible_version>
  • docker tag terraform-<tf_version>-ansible-runner-<runner_version> <docker_username>/terraform-<tf_version>-ansible-runner-<runner_version>:<ansible_version>
  • docker push <docker_username>/terraform-<tf_version>-ansible-runner-<runner_version>:<ansible_version>

Example:

docker build -t terraform-0.11.10-ansible-runner-1.3.4:2.8.5 .
docker tag terraform-0.11.10-ansible-runner-1.3.4 nickmaccarthy/terraform-0.11.10-ansible-runner-1.3.4:2.8.5
docker push nickmaccarthy/terraform-0.11.10-ansible-runner-1.3.4:2.8.5

Build Args