Hello! I’m going to start some posts about Terraform here, describing the resources that I’m going to use from now on in this project.

I won’t have a Terraform server, the idea is to run Terraform procedures in a POD on K8, triggered by Jenkins pipelines, so the first step is to create an image that has Terraform installed and some other requirements that I will use in the projects, such as Python and some modules.

To do this, we will use as a base the Python image that we have already created (https://github.com/faustobranco/devops-db/tree/master/Initial%20Images/ubuntu) and create one with the Terraform installation and add some more Python components.
Dockerfile and requirements.txt are in our repository:

https://github.com/faustobranco/devops-db/tree/master/Initial%20Images/terraform

Let’s build the image, I’ll call it ubuntu_terraform:1.0.0 and push it to our registry.

docker image build --rm --no-cache -t ubuntu_terraform:1.0.0 .

docker image tag ubuntu_terraform:1.0.0 registry.devops-db.internal:5000/ubuntu_terraform:1.0.0

docker image push registry.devops-db.internal:5000/ubuntu_terraform:1.0.0

After pushing, check in Registry.

Related Post