github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/docker/index.html.markdown (about) 1 --- 2 layout: "docker" 3 page_title: "Provider: Docker" 4 sidebar_current: "docs-docker-index" 5 description: |- 6 The Docker provider is used to interact with Docker containers and images. 7 --- 8 9 # Docker Provider 10 11 The Docker provider is used to interact with Docker containers and images. 12 It uses the Docker API to manage the lifecycle of Docker containers. Because 13 the Docker provider uses the Docker API, it is immediately compatible not 14 only with single server Docker but Swarm and any additional Docker-compatible 15 API hosts. 16 17 Use the navigation to the left to read about the available resources. 18 19 <div class="alert alert-block alert-info"> 20 <strong>Note:</strong> The Docker provider is new as of Terraform 0.4. 21 It is ready to be used but many features are still being added. If there 22 is a Docker feature missing, please report it in the GitHub repo. 23 </div> 24 25 ## Example Usage 26 27 ``` 28 # Configure the Docker provider 29 provider "docker" { 30 host = "tcp://127.0.0.1:1234/" 31 } 32 33 # Create a container 34 resource "docker_container" "foo" { 35 image = "${docker_image.ubuntu.latest}" 36 name = "foo" 37 } 38 39 resource "docker_image" "ubuntu" { 40 name = "ubuntu:latest" 41 } 42 ``` 43 44 ## Argument Reference 45 46 The following arguments are supported: 47 48 * `host` - (Required) This is the address to the Docker host. If this is 49 blank, the `DOCKER_HOST` environment variable will also be read. 50 51 * `cert_path` - (Optional) Path to a directory with certificate information 52 for connecting to the Docker host via TLS. If this is blank, the 53 `DOCKER_CERT_PATH` will also be checked.