- Ensure
config.hcl
file is inconfig
directory - run
docker compose up -d
- run
docker compose exec vault chown -R vault:vault /vault
- run
docker compose exec vault apk add curl
- run
docker compose exec vault curl --request POST --data '{"secret_shares": 1, "secret_threshold": 1}' http://127.0.0.1:8200/v1/sys/init
- Save the output from the previous command, what should look like:
{ "keys": [ "f62f3164946c7c72f2c64b663c6cd1b5f4eacc2638d81c36f8661d7316778385" ], "keys_base64": [ "9i8xZJRsfHLyxktmPGzRtfTqzCY42Bw2+GYdcxZ3g4U=" ], "root_token": "hvs.7hYxIGDTdT0Z1pw2tZFvOiKP" }
- go to http://localhost:8200
- use the part in the
keys_base64
to unseal. - in the next window, use the part in the
root_token
to enter. - You are in!
Created
December 13, 2022 13:51
-
-
Save magmax/ee53b853f6e55d8278af85fd1c751188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ui = true | |
storage "file" { | |
path = "/vault/file" | |
} | |
listener "tcp" { | |
address = "0.0.0.0:8200" | |
tls_disable = 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
vault: | |
image: vault | |
command: server | |
volumes: | |
- data:/vault | |
- ./config:/vault/config | |
ports: | |
- 8200:8200 | |
cap_add: | |
- IPC_LOCK | |
volumes: | |
data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment