terraform-provider-docker with colima

Testing it out to run terraform locally, it complains Docker is not runnig while running

$ terraform apply
# Cannot connect to the Docker daemon at unix:///var/run/docker.sock

Simple fix to change the DOCKER_HOST

export DOCKER_HOST=$(docker context inspect | jq -r '.[0].Endpoints.docker.Host')
export TF_LOG=trace

Reference:

  1. Support for Docker contexts: https://github.com/kreuzwerker/terraform-provider-docker/issues/540

Created 2023-12-13T11:36:45+08:00 · Edit