gitwtfhub

wtf is terraform-provider-docker?

moritzheiber/terraform-provider-docker — explained in plain English

Analysis updated 2026-07-22 · repo last pushed 2026-04-20

GoAudience · ops devopsComplexity · 3/5MaintainedSetup · moderate

TL;DR

A plugin that lets you manage Docker containers and images through Terraform configuration files instead of running Docker commands by hand. You describe what containers you want and Terraform creates and updates them automatically.

Mindmap

mindmap
  root((repo))
    What it does
      Manages Docker containers
      Manages Docker images
      Supports Docker Services
    Tech stack
      Go
      Terraform
      Docker
    Use cases
      Define Nginx web server
      Run multiple replicas
      Manage containers as code
    Audience
      Terraform users
      DevOps teams
      Startups on cloud
    Maintenance
      By Kreuzwerker
      Sponsored by Coder
      Migration guides included

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Define and start an Nginx web server container with custom port mappings using Terraform configuration.

REASON 2

Spin up multiple copies of the same container for load balancing using Docker Services.

REASON 3

Manage Docker containers alongside cloud infrastructure in the same Terraform workflow.

What's in the stack?

GoTerraformDocker

How it stacks up

moritzheiber/terraform-provider-docker42wim/fabio42wim/go-xmpp
LanguageGoGoGo
Last pushed2026-04-202018-02-042020-01-24
MaintenanceMaintainedDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Terraform version 1.1.5 or higher and a working Docker installation on the machine where containers will run.

No license information was provided in the explanation, so usage rights are unclear.

Wtf does this do

Terraform Provider for Docker lets you manage Docker containers and images using Terraform, a popular infrastructure-as-code tool. Instead of running Docker commands by hand every time you want to start, stop, or update a container, you write a configuration file describing what you want, and the provider makes it happen automatically. In practical terms, the example in the README shows someone defining an Nginx web server container. They write a few lines specifying the image name, the port mapping (8080 on the outside, 80 on the inside), and Terraform handles pulling the image and starting the container. You can also define Docker Services with multiple replicas, which means you can spin up several copies of the same container for load balancing, all from the same configuration file. This tool is built for teams and individuals who already use Terraform to manage their cloud infrastructure (servers, databases, networks) and want to bring Docker containers into that same workflow. For example, a startup that uses Terraform to provision AWS instances might also want to define the Docker containers running on those instances in the same place, rather than maintaining a separate set of scripts or manual processes. It keeps everything version-controlled and reproducible. The project is written in Go and requires at least Terraform version 1.1.5. It's maintained by a company called Kreuzwerker and sponsored by Coder. The README includes migration guides for users upgrading between major versions (v2 to v3, v3 to v4), suggesting an actively maintained project with breaking changes over time. Beyond that, the README directs readers to the Terraform Registry for full documentation, so the repo itself is fairly sparse on usage details.

Yoink these prompts

Prompt 1
Write a Terraform configuration file that uses the docker provider to start an Nginx container with port 8080 mapped to port 80 inside the container.
Prompt 2
Create a Terraform config using the docker provider that defines a Docker Service with three replicas of the same container image for load balancing.
Prompt 3
Show me how to configure the docker provider in Terraform and pull a specific Docker image before starting a container from it.
Prompt 4
Write a Terraform configuration that manages both an AWS EC2 instance and a Docker container running on that instance using the docker provider.

Frequently asked questions

wtf is terraform-provider-docker?

A plugin that lets you manage Docker containers and images through Terraform configuration files instead of running Docker commands by hand. You describe what containers you want and Terraform creates and updates them automatically.

What language is terraform-provider-docker written in?

Mainly Go. The stack also includes Go, Terraform, Docker.

Is terraform-provider-docker actively maintained?

Maintained — commit in last 6 months (last push 2026-04-20).

What license does terraform-provider-docker use?

No license information was provided in the explanation, so usage rights are unclear.

How hard is terraform-provider-docker to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is terraform-provider-docker for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.