Skip to content

Instantly share code, notes, and snippets.

@hemanth22
Forked from ashutoshkarna03/main.tf
Created August 16, 2020 13:26
Show Gist options
  • Save hemanth22/e7a65531cdeae59f8a1ed0f1e65a515c to your computer and use it in GitHub Desktop.
Save hemanth22/e7a65531cdeae59f8a1ed0f1e65a515c to your computer and use it in GitHub Desktop.
resource "docker_container" "hello_world_app" {
image = "hello_world_app:latest"
name = "hello_world_app"
restart = "always"
volumes {
container_path = "/myapp"
# replace the host_path with full path for your project directory starting from root directory /
host_path = "/path/to/your/project/directory"
read_only = false
}
ports {
internal = 8080
external = 8080
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment