diff --git a/vault/README.md b/vault/README.md index 5a7db17..d5cc6c1 100644 --- a/vault/README.md +++ b/vault/README.md @@ -11,11 +11,6 @@ providing tight access control and recording a detailed audit log. ## docker-compose.yml ``` -data: - image: busybox - volumes: - - /var/lib/vault - vault: image: vimagick/vault ports: @@ -23,8 +18,6 @@ vault: volumes: - vault/vault.crt:/etc/vault/vault.crt - vault/vault.key:/etc/vault/vault.key - volumes_from: - - data privileged: true restart: always ``` @@ -43,6 +36,7 @@ $ docker exec -it vault_vault_1 sh >>> cd /etc/vault >>> vault init -tls-skip-verify -key-shares=5 -key-threshold=3 | tee vault.secret >>> exit +$ docker run --rm --volumes-from vault_vault_1 -v `pwd`:/backup alpine tar cvzf /backup/vault.tgz /etc/vault /var/lib/vault ``` > Split `vault.secret`, keep them a secret. diff --git a/vault/docker-compose.yml b/vault/docker-compose.yml index 1e6fb89..a8513dc 100644 --- a/vault/docker-compose.yml +++ b/vault/docker-compose.yml @@ -1,8 +1,3 @@ -data: - image: busybox - volumes: - - /var/lib/vault - vault: image: vimagick/vault ports: @@ -10,7 +5,5 @@ vault: volumes: - vault/vault.crt:/etc/vault/vault.crt - vault/vault.key:/etc/vault/vault.key - volumes_from: - - data privileged: true restart: always