Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.32 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.32 KB

Contents

What is Docker provider in terraform?

The Docker provider is used to interact with Docker containers and images. It uses the Docker API to manage the lifecycle of Docker containers. Because the Docker provider uses the Docker API, it is immediately compatible not only with single server Docker but Swarm and any additional Docker-compatible API hosts. read more here

How to run?

First you need to initialize terraform.

terraform init

now its time to actually using apply.

terraform apply

NOTE: to verify these two components one by one if they are created successfully using terraform with docker provider, run:

docker image # Verify docker image
docker ps -a # Verify docker container

About Resources

execute some long running commands to ensure my ubuntu image doesn't finish immediately.

also must_run = true trying to keep container running. If false, then as long as the container exists, Terraform assumes it is successful.

Roadmap

  • Create docker image
  • Create docker container
  • Create docker service