Docker volumes not persisting, what does vault use?

Hi,

I have installed vault using the following https://hub.docker.com/_/vault

I tried to setup named volumes but its not persisting because when create a new engine and add some key values in there and then force a recreate of the container, all data is lost…

I am using the following, but maybe its not correct ?

volumes:
  - vault-data:/vault/file    
  - vault-config:/vault/config

Can anybody confirm what volumes I should be using to enabled correct resistance ?

Thanks

What’s your config? By default the container starts with -dev so everything is stored in memory. /vault/file would be the path for file storage and the volume is exported by the container already.