From c53e94707bc1cc2e5d80b7fb8409174d31db96ee Mon Sep 17 00:00:00 2001 From: Amaury Souza Date: Wed, 15 Jan 2020 11:27:02 -0300 Subject: [PATCH] Update README.md New file ".tf" for your repo about Docker and Terraform. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 91e7329..31dcba6 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,24 @@ So all above things, we need to call commands every time. To provision the docke 5. Docker Volume 6. Docker container with nginx server 7. Docker network etc... + + +### Simple example Terraform and Docker + +`# Configure the Docker provider +provider "docker" { + } +# Create a Apache Container +resource "docker_container" "nginx" { + image = "nginx" + name = "enginecks-teste" + ports { + internal = "80" + external = "80" + } +} +# Create a image +resource "docker_image" "nginx" { + name = "nginx:latest" +} +`