For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Docker Compose

Docker Compose runs the whole stack on one machine, for evaluation and demos. For production use the Helm chart. If you want to change Terrakube itself, use the Dev Container instead.

Requirements

  • Docker Engine or Docker Desktop with the Compose plugin

  • mkcert, to create a locally trusted HTTPS certificate

No custom Docker network, DNS server or /etc/hosts entries are needed. The stack uses the *.localhost names, which resolve to your machine on their own.

Start Terrakube

git clone https://github.com/terrakube-io/terrakube.git
cd terrakube/docker-compose

mkcert -install

mkcert -key-file privkey.pem -cert-file fullchain.pem \
  localhost terrakube.localhost terrakube-api.localhost \
  terrakube-registry.localhost terrakube-executor.localhost \
  terrakube-dex.localhost
cp "$(mkcert -CAROOT)/rootCA.pem" rootCA.pem

docker compose up -d

Restart your browser once after mkcert -install. After a minute or two open https://terrakube.localhost and sign in with admin@example.com and password admin.

URL
Service

https://terrakube.localhost

UI

https://terrakube-api.localhost

API

https://terrakube-registry.localhost

Registry

https://terrakube-dex.localhost

Dex sign-in

The certificate, private key and root CA are local files. Do not commit them.

Choose the version and options

Settings are in docker-compose/.env. The ones you will most likely change:

Variable
Description

TK_VERSION

Terrakube image version for the API, executor, registry and UI. Set it to the release you want to try; the value in the repository can be older than the latest release.

DOMAIN

Base domain, localhost by default.

TERRAFORM_LOGIN_ENABLED

Set to true to enable terraform login through Terrakube.

Restart with docker compose up -d --force-recreate after changing them.

Thanks to SolomonHD for the original Traefik setup.

Last updated

Was this helpful?