The official image is published at ghcr.io/someblackmagic/vault-manager.
The container expects:
- The configuration file at
/root/.vault-managerrc(mount from host) - An optional working directory for
syncoperations (mount from host)
These examples run the same commands documented in commands.md and sync.md — Docker is just one way of invoking the CLI.
docker run --rm \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
ghcr.io/someblackmagic/vault-manager \
statusdocker run --rm \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
ghcr.io/someblackmagic/vault-manager \
get secret/myapp/dbdocker run --rm \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync pull secret/myapp /secretsAfter the command completes, ./secrets/ on the host will contain the
downloaded JSON files.
docker run --rm \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync plan secret/myapp /secretsBecause apply prompts for confirmation, attach a TTY with -it:
docker run --rm -it \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync apply secret/myapp /secretsTo skip the interactive prompt in CI pipelines, pipe y to stdin:
echo y | docker run --rm -i \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync apply secret/myapp /secretsIf you prefer not to mount a config file you can supply Vault connection details via environment variables:
docker run --rm -it \
-e VAULT_ADDR=https://vault.example.com:8200 \
-e VAULT_TOKEN=s.xxxxxxxxxxxxxxxx \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync apply secret/myapp /secretsSkipping TLS verification (e.g. self-signed certificates):
docker run --rm \
-e VAULT_ADDR=https://vault.example.com:8200 \
-e VAULT_TOKEN=s.xxxxxxxxxxxxxxxx \
-e VAULT_SKIP_VERIFY=true \
-v "$(pwd)/secrets:/secrets" \
ghcr.io/someblackmagic/vault-manager \
sync plan secret/myapp /secretsPass the logging variables with -e to get diagnostic logs on the
container's stderr:
docker run --rm \
-v "$HOME/.vault-managerrc:/root/.vault-managerrc:ro" \
-v "$(pwd)/secrets:/secrets" \
-e VAULT_MANAGER_LOG_LEVEL=debug \
-e VAULT_MANAGER_LOG_FORMAT=json \
ghcr.io/someblackmagic/vault-manager \
sync plan secret/myapp /secretsVAULT_MANAGER_LOG_LEVEL accepts error, warn, info (default),
debug and trace; VAULT_MANAGER_LOG_FORMAT accepts text (default)
and json. The --log-level / --log-format flags work too and take
precedence. Don't ship trace output to a shared CI log without
reviewing it: it lists every Vault URL that was requested.
services:
vault-sync:
image: ghcr.io/someblackmagic/vault-manager
volumes:
- ~/.vault-managerrc:/root/.vault-managerrc:ro
- ./secrets:/secrets
environment:
VAULT_ADDR: https://vault.example.com:8200
VAULT_MANAGER_LOG_LEVEL: info
VAULT_MANAGER_LOG_FORMAT: json
command: sync plan secret/myapp /secretsRun with:
docker compose run --rm vault-sync