Skip to content

Commit

Permalink
Add Vault Management API example
Browse files Browse the repository at this point in the history
  • Loading branch information
tangowithfoxtrot committed Mar 26, 2023
1 parent 5873f00 commit a448567
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
The latest Bitwarden CLI in a Docker container.

## Instructions
### Interactive CLI
Run `docker build -t bw-cli:latest .`

Then, `docker run -v $HOME/.config/Bitwarden\ CLI/:/root/.config/Bitwarden\ CLI/ -it bw-cli:latest login`

### Serve API
Create a local [Vault Management API](https://bitwarden.com/help/vault-management-api/) instance:

`docker-compose.yml`
```yaml
version: '3.3'
services:
bw_api:
container_name: bwapi
hostname: bwapi
platform: linux/amd64
image: tangowithfoxtrot/bw-cli:serve-latest
ports:
- '127.0.0.1:2929:2929' # serve on 127.0.0.1
volumes:
- "$HOME/.config/Bitwarden CLI:/root/.config/Bitwarden CLI"
healthcheck:
test: curl -f http://127.0.0.1:2929/status
interval: 5s
timeout: 2s
retries: 3
start_period: 5s
```

0 comments on commit a448567

Please sign in to comment.