2. Create Following file structure inside that folder
3. Inside volume folder:
4. Inside config folder:
5. Create a docker-composer.yml file and fill it like below:
version: '3'
services:
vault:
image: vault
container_name: vault
ports:
- "8200:8200"
restart: always
volumes:
- /home/prabod/UOE/vault-docker/volumes/config:/vault/config
- /home/prabod/UOE/valut-docker/volumes/logs:/vault/logs
- /home/prabod/UOE/valut-docker/volumes/file:/vault/file
cap_add:
- IPC_LOCK
entrypoint: vault server -config=/vault/config/vault.json
Note: Please update above highlighted path as your.
6. Create a vault.json file and fill it like below:
{
"backend": {
"file": {
"path": "/vault/file"
}
},
"listener": {
"tcp":{
"address": "0.0.0.0:8200", # Listener host and port
"tls_disable": 1
}
},
"ui": true # Enable UI
}
After creating all files and folders, Open terminal and navigate the location to vault-docker folder and run below command to up docker composer
docker-compose up
After successfully start docker vault, You should be able to login into the vault UI:
http://localhost:8200/ui/
Then create a vault token for you login.
No comments:
Post a Comment