Hacker News new | ask | show | jobs
by morenoh149 2363 days ago
can you use terraform with docker? should you?
3 comments

No, you should not use terraform with Docker. Use something like microk8s or docker-compose to spin up containers for local development, then run terraform against k8s/ECS/your platform of choice to codify the infrastructure as code.
They don't operate at the same level, so it's common that a project would utilise both. For instance Terraform can create your K8s cluster, that you then later use as a target to run your containers
yes, you can send instructions to Docker daemons (on remote machines, you must enable the TCP listener).

It works pretty well