Skip to content

Instantly share code, notes, and snippets.

@kharandziuk
Created October 16, 2019 10:51
Show Gist options
  • Select an option

  • Save kharandziuk/82a007a8c097be4d5faf0a0df112ce01 to your computer and use it in GitHub Desktop.

Select an option

Save kharandziuk/82a007a8c097be4d5faf0a0df112ce01 to your computer and use it in GitHub Desktop.
docker provider with terraform locally
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