This repository is simply a dockerised version of the Google Spanner CLI by Cloud Spanner Ecosystem.
This shell statement shows the basic usage, which will download the CLI and perform an intial connection.
docker run --rm --env SPANNER_DATABASE=database_name --env SPANNER_INSTANCE_ID=instance_id --env SPANNER_PROJECT_ID=project_id sjdaws/spanner-cli:latest
This is the equivalent configuration for docker-compose
, with custom environment variables for your spanner instance.
version: '3'
services:
spanner-cli:
image: sjdaws/spanner-cli:latest
environment:
- SPANNER_DATABASE=database_name
- SPANNER_INSTANCE_ID=instance_id
- SPANNER_PROJECT_ID=project_id