Skip to content

Instantly share code, notes, and snippets.

@ashutoshkarna03
Created June 5, 2020 19:56
Show Gist options
  • Save ashutoshkarna03/eee7f1e45c0bcabae0cde3f5c68228de to your computer and use it in GitHub Desktop.
Save ashutoshkarna03/eee7f1e45c0bcabae0cde3f5c68228de 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