Skip to content

Commit

Permalink
feat: first example provisioning a local docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Briggs committed Oct 13, 2021
1 parent a854f06 commit 3504274
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Empty file.
24 changes: 24 additions & 0 deletions 1-terraform-docker-container/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
terraform {
required_providers {
docker = {
source = "kreuzwerker/docker"
version = "~> 2.15.0"
}
}
}

provider "docker" {}

resource "docker_image" "nginx" {
name = "nginx:latest"
keep_locally = false
}

resource "docker_container" "nginx" {
image = docker_image.nginx.latest
name = "tutorial"
ports {
internal = 80
external = 8000
}
}

0 comments on commit 3504274

Please sign in to comment.