It will flush them to disk, but in a container that will be ephemeral and be cleared after restart
Most of the time shared volumes for containers isn’t a popular option because of the ops/logistics involved, so in our experience, most users going the docker route will generate their API Definitions once, store them in version control and use CI / CD to re-create those definitions in a CE Gateway after container launch using the Gateway API or a tool like tyk-git.