# Configure the Docker provider
provider "docker" {
host = "tcp://153.126.155.210:2376/"
cert_path = "/Users/t-shuichi/Dropbox/Public/docker_tls"
}
# Create a container
resource "docker_container" "python" {
image = "${docker_image.python.latest}"
name = "python"
command = ["python", "-m", "smtpd", "-c", "DebuggingServer", "0.0.0.0:25"]
ports = {
internal = 25
external = 25
}
volumes = {
container_path = "/mnt/uploadfiles"
host_path = "/home/tshst/uploadfiles"
}
}
resource "docker_image" "python" {
name = "python:2.7.11-slim"
}
Created
December 29, 2015 13:28
-
-
Save tshst/249f1a1d0c1aa115c0c4 to your computer and use it in GitHub Desktop.
python.tf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment