cli
cli copied to clipboard
Hardcode TF version to v1.13.4 for Docker build
Example how to use a later TF version in a Docker build.
Prerequisites
- Go 1.25+ installed
- Docker installed
Steps
1. Build the CLI binary
Build a static binary that can run in Alpine Linux:
CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o databricks
2. Build the Docker image
Build the Docker image with the desired architecture:
# For amd64
docker build -t databricks-cli --build-arg ARCH=amd64 .
# For arm64
docker build -t databricks-cli --build-arg ARCH=arm64 .
3. Verify the build
Test that the image works:
docker run --rm databricks-cli version
Notes
- The static binary (CGO_ENABLED=0) is required because the Docker image uses Alpine Linux with musl libc
- The Docker image includes Terraform v1.13.4 and the Databricks Terraform provider
- Environment variables are pre-configured in the image:
- DATABRICKS_TF_VERSION=1.13.4
- DATABRICKS_TF_EXEC_PATH=/app/bin/terraform
| Env | πβflaky | πβRECOVERED | πβSKIP | β βpass | πβskip | |
|---|---|---|---|---|---|---|
| πβ | aws linux | 1 | 1 | 321 | 561 | |
| πβ | aws windows | 1 | 1 | 322 | 560 | |
| πβ | aws-ucws linux | 2 | 1 | 436 | 457 | |
| πβ | aws-ucws windows | 1 | 1 | 438 | 456 | |
| πβ | azure linux | 1 | 1 | 321 | 560 | |
| πβ | azure windows | 1 | 1 | 322 | 559 | |
| πβ | azure-ucws linux | 1 | 1 | 437 | 456 | |
| πβ | azure-ucws windows | 1 | 1 | 438 | 455 | |
| πβ | gcp linux | 10 | 1 | 1 | 310 | 562 |
| πβ | gcp windows | 5 | 1 | 1 | 316 | 561 |
18 failing tests:
| Test Name | aws linux | aws windows | aws-ucws linux | aws-ucws windows | azure linux | azure windows | azure-ucws linux | azure-ucws windows | gcp linux | gcp windows |
|---|---|---|---|---|---|---|---|---|---|---|
| TestAccept | πβR | πβR | πβf | πβR | πβR | πβR | πβR | πβR | πβR | πβR |
| TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=direct-exp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=terraform | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/deploy/mlops-stacks | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct-exp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/deployment/bind/job/job-spark-python-task | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/destroy/jobs-and-pipeline | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=terraform | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/resources/jobs/double-underscore-keys | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf |
| TestAccept/bundle/resources/jobs/double-underscore-keys/DATABRICKS_BUNDLE_ENGINE=terraform | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf |
| TestAccept/bundle/resources/synced_database_tables/basic | πβs | πβs | πβf | β βp | πβs | πβs | β βp | β βp | πβs | πβs |
| TestAccept/bundle/run/app-with-job | πβS | πβS | πβS | πβS | πβS | πβS | πβS | πβS | πβS | πβS |
| TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=yes/PY=no | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=no/PY=yes | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=no | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf | β βp |
| TestAccept/bundle/templates/default-python/integration_classic | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf |
| TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_BUNDLE_ENGINE=terraform/UV_PYTHON=3.13 | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf |
| TestSyncIncrementalFileOverwritesFolder | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | β βp | πβf |