This guide explains how to use the Pangolin CLI tools (pangolin-admin and pangolin-user) via the Docker container instead of installing binaries locally.
The Pangolin CLI tools are available in the alexmerced/pangolin-cli Docker image:
docker pull alexmerced/pangolin-cli:0.1.0The Docker image includes both CLI tools:
pangolin-admin- Administrative operations (tenants, warehouses, catalogs, users, permissions)pangolin-user- User operations (discovery, access requests, tokens, branches)
docker run --rm alexmerced/pangolin-cli:0.1.0 pangolin-admin --helpdocker run --rm alexmerced/pangolin-cli:0.1.0 pangolin-user --helpPass configuration via environment variables:
docker run --rm \
-e PANGOLIN_API_URL=http://your-api:8080 \
-e PANGOLIN_TOKEN=your_jwt_token \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-tenantsMount a configuration file into the container:
docker run --rm \
-v $(pwd)/config.json:/root/.pangolin/config.json \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-tenantsFor interactive sessions, use the -it flags:
docker run -it \
-e PANGOLIN_API_URL=http://localhost:8080 \
alexmerced/pangolin-cli:0.1.0 \
pangolin-adminCreate a shell alias for easier usage:
# Add to your .bashrc or .zshrc
alias pangolin-admin='docker run --rm -e PANGOLIN_API_URL=http://localhost:8080 alexmerced/pangolin-cli:0.1.0 pangolin-admin'
alias pangolin-user='docker run --rm -e PANGOLIN_API_URL=http://localhost:8080 alexmerced/pangolin-cli:0.1.0 pangolin-user'
# Then use like normal commands
pangolin-admin list-tenants
pangolin-user search "my dataset"Include CLI tools in your docker-compose.yml:
services:
cli:
image: alexmerced/pangolin-cli:0.1.0
environment:
- PANGOLIN_API_URL=http://pangolin-api:8080
- PANGOLIN_TOKEN=${PANGOLIN_TOKEN}
command: ["echo", "CLI tools ready. Use: docker compose run cli pangolin-admin --help"]
depends_on:
- pangolin-apiRun commands:
docker compose run --rm cli pangolin-admin list-tenants
docker compose run --rm cli pangolin-user search "customers"When the API is running on your host machine:
Linux:
docker run --rm \
--network host \
-e PANGOLIN_API_URL=http://localhost:8080 \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-tenantsMac/Windows:
docker run --rm \
-e PANGOLIN_API_URL=http://host.docker.internal:8080 \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-tenantsWhen using Docker Compose or a custom network:
docker run --rm \
--network your_network_name \
-e PANGOLIN_API_URL=http://pangolin-api:8080 \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-tenantsdocker run --rm \
-e PANGOLIN_API_URL=http://localhost:8080 \
-e PANGOLIN_TOKEN=your_root_token \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin create-tenant --name "acme"docker run --rm \
-e PANGOLIN_API_URL=http://localhost:8080 \
-e PANGOLIN_TOKEN=your_token \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin list-catalogsdocker run --rm \
-e PANGOLIN_API_URL=http://localhost:8080 \
-e PANGOLIN_TOKEN=your_token \
alexmerced/pangolin-cli:0.1.0 \
pangolin-user search "sales"docker run --rm \
-e PANGOLIN_API_URL=http://localhost:8080 \
-e PANGOLIN_TOKEN=your_admin_token \
alexmerced/pangolin-cli:0.1.0 \
pangolin-admin generate-token --user-id user_123 --expiry 7d✅ No Installation: No need to install Rust or compile binaries
✅ Consistent Environment: Same version across all platforms
✅ Easy Updates: docker pull to get the latest version
✅ Isolation: Doesn't affect your system
✅ CI/CD Friendly: Easy to integrate into pipelines
❌ Slower Startup: Docker overhead on each command ❌ Longer Commands: More verbose than native binaries ❌ Network Complexity: Requires understanding Docker networking
Use Docker when:
- You don't want to install binaries
- Running in CI/CD pipelines
- Need consistent environments across teams
- Already using Docker for other tools
Use Binaries when:
- Running many commands frequently
- Want faster execution
- Prefer simpler command syntax
- Working locally without Docker
Check network connectivity:
docker run --rm --network host alpine ping -c 3 localhostEnsure your user is in the docker group:
sudo usermod -aG docker $USER
# Log out and back inVerify your token is valid:
curl -H "Authorization: Bearer $PANGOLIN_TOKEN" http://localhost:8080/api/v1/tenants