Add Dockerized OpenTofu runner

This commit is contained in:
2026-04-20 17:09:52 -03:00
parent 8d396bd38a
commit 8651544d2c
4 changed files with 83 additions and 0 deletions
+42
View File
@@ -89,6 +89,48 @@ Destroy:
tofu destroy
```
## Docker Usage
You can run OpenTofu from a Docker container instead of installing it on the host.
Build the runner image:
```bash
docker compose build tofu
```
Run `init` for the default `dev` environment:
```bash
docker compose run --rm tofu init
```
Run `plan`:
```bash
docker compose run --rm tofu plan
```
Run `apply`:
```bash
docker compose run --rm tofu apply
```
Select another environment with `QUANTUM_ENV`:
```bash
QUANTUM_ENV=stg docker compose run --rm tofu plan
QUANTUM_ENV=prd docker compose run --rm tofu plan
```
On PowerShell:
```powershell
$env:QUANTUM_ENV="stg"
docker compose run --rm tofu plan
```
## Quick Tests
List buckets: