Skip to content

terraform and use docker provider in terraform to automate docker images and containers.

License

Notifications You must be signed in to change notification settings

vashian/terraform-docker-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

terraform and use docker provider in terraform to automate docker images and containers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages