Created
March 29, 2018 06:57
-
-
Save derekm1215/f8d666d51e475f208acb1def01351d72 to your computer and use it in GitHub Desktop.
This file contains 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
# Download the latest Ghost Image | |
resource "docker_image" "image_id" { | |
name = "ghost:latest" | |
} | |
# Start the Container | |
resource "docker_container" "container_id" { | |
name = "blog" | |
image = "${docker_image.image_id.latest}" | |
ports { | |
internal = "2368" | |
external = "80" | |
} | |
} | |
#Output the IP Address of the Container | |
output "IP Address" { | |
value = "${docker_container.container_id.ip_address}" | |
} | |
output "container_name" { | |
value = "${docker_container.container_id.name}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment