Skip to content

Instantly share code, notes, and snippets.

@fmolliet
Created April 18, 2024 15:51
Show Gist options
  • Select an option

  • Save fmolliet/0bb6a13f92740df31c2ffe6f0623bfa3 to your computer and use it in GitHub Desktop.

Select an option

Save fmolliet/0bb6a13f92740df31c2ffe6f0623bfa3 to your computer and use it in GitHub Desktop.
Vault Hashicorp Local Container
version: '3.6'
services:
vault:
image: vault:1.13.3
healthcheck:
retries: 5
restart: always
ports:
- 8200:8200
environment:
VAULT_ADDR: 'https://0.0.0.0:8200'
VAULT_LOCAL_CONFIG: '{"listener": [{"tcp":{"address": "0.0.0.0:8200","tls_disable":"1"}}], "ui": true, "storage": [{"file": {"path":"/vault/data"}}]}'
cap_add:
- IPC_LOCK
volumes:
- config_volume:/vault/config
- data_volume:/vault/data
command: >
/bin/sh -c "
chmod -R 777 /vault/data &&
vault server -config /vault/config/local.json
"
volumes:
config_volume:
driver: local
data_volume:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment