Created
October 16, 2019 10:51
-
-
Save kharandziuk/82a007a8c097be4d5faf0a0df112ce01 to your computer and use it in GitHub Desktop.
docker provider with terraform locally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "docker" { | |
| host = "unix:///var/run/docker.sock" | |
| } | |
| resource "docker_image" "ubuntu" { | |
| name = "ubuntu:precise" | |
| } | |
| resource "docker_image" "nginx" { | |
| name = "nginx:latest" | |
| } | |
| resource "docker_container" "nginx" { | |
| image = docker_image.nginx.latest | |
| name = "enginecks" | |
| ports { | |
| internal = 80 | |
| external = 80 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment