Terraform Provider - Docker
Find a file
2021-01-22 21:10:38 +01:00
.github feat: add ability to lint/check of links in documentation locally (#98) 2020-12-27 19:02:34 +09:00
docker docs: fix legacy configuration style (#126) 2021-01-19 16:20:29 +01:00
examples/ssh-protocol Add ssh protocol (copy) (#153). Closes #112 2019-05-26 21:06:10 +02:00
scripts feat: add properties -it (tty and stdin_opn) to docker container 2021-01-18 09:00:26 +01:00
tools feat: add ability to lint/check of links in documentation locally (#98) 2020-12-27 19:02:34 +09:00
website docs: fix legacy configuration style (#126) 2021-01-19 16:20:29 +01:00
.gitignore chore: ignores testing folders 2020-12-24 16:26:29 +01:00
.go-version chore: bump go 115 (#297) 2020-10-13 11:23:18 +02:00
.golangci.yml chore: introduces golangci-lint (#32) 2020-12-20 11:04:51 +01:00
.goreleaser.yml ci(goreleaser): switches from free to openbsd 2020-11-11 09:34:41 +01:00
.markdownlinkcheck.json ci: fix test of website 2020-12-12 01:21:02 +09:00
.markdownlint.yml ci: fix test of website 2020-12-12 01:21:02 +09:00
CHANGELOG.md chore: update changelog for v2.11.0 2021-01-22 21:10:38 +01:00
CODE_OF_CONDUCT.md docs: adds coc and contributing 2020-12-24 16:27:35 +01:00
CONTRIBUTING.md feat: add local semantic commit validation (#99) 2020-12-27 11:18:22 +01:00
GNUmakefile feat: add local semantic commit validation (#99) 2020-12-27 11:18:22 +01:00
go.mod feat: supports Docker plugin (#35) 2021-01-08 16:38:30 +01:00
go.sum feat: adds docker Image build feature (#283) 2020-10-07 20:06:13 +02:00
LICENSE initial commit 2017-06-05 20:59:08 +00:00
main.go Move to standalone plugin SDK (#200) 2019-10-09 20:25:38 +02:00
README.md feat: add local semantic commit validation (#99) 2020-12-27 11:18:22 +01:00

Terraform Provider

Requirements

  • Terraform >=0.12.x
  • Go 1.15.x (to build the provider plugin)

Building The Provider

$ git clone git@github.com:terraform-providers/terraform-provider-docker
$ make build

Example usage

# Set the required provider and versions
terraform {
  required_providers {
    # We recommend pinning to the specific version of the Docker Provider you're using
    # since new versions are released frequently
    docker = {
      source  = "kreuzwerker/docker"
      version = "2.8.0"
    }
  }
}

# Configure the docker provider
provider "docker" {
}

# Create a docker image resource
# -> docker pull nginx:latest
resource "docker_image" "foo" {
  name         = "c"
  keep_locally = true
}

# Create a docker container resource
# -> docker run --name foo -d nginx:latest
resource "docker_container" "foo" {
  name    = "foo"
  image   = docker_image.foo.latest
}