From the course: DevOps Foundations: Your First Project

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Creating a Terraform Docker Compose service

Creating a Terraform Docker Compose service

From the course: DevOps Foundations: Your First Project

Start my 1-month free trial

Creating a Terraform Docker Compose service

- [Instructor] And the last thing we're going to do is install it in Docker Compose, which is really easy. So I'm going to open up my YAML, and I'm going to add a new service, up here, called Terraform, and much like our website we need to build the image, so I'm going to do build and then context, our current directory, and that's literally it, really simple, because we're just making this available in our Docker Compose as a service, and it doesn't have any other options, so very easy. I'm going to save that, I'm going to quit, and I'm going to just verify that this runs within Compose with docker-compose run. This is a single one-shot command so I can use run here. I don't want to save this container, so --rm and then terraform. One thing I forgot to do, provide the Dockerfile. So let's go ahead and do that, here, with the Dockerfile option. So the Dockerfile option tells Docker Compose to use a differently named…

Contents