4 ms·
Here's a dockerfile setup I wrote for Postgres which uses a 'data container' for the entire Postgres database: https://github.com/codelittinc/dockerfiles/tree/m
by tonyhb 13y ago
Here's a dockerfile setup I wrote for Postgres which uses a 'data container' for the entire Postgres database: https://github.com/codelittinc/dockerfiles/tree/master/postgres https://github.com/codelittinc/dockerfiles/tree/master/postg...
The gist of it is that you explicitly tell your DB container that there will be a shared directory on the container at runtime. This allows you to chown the directory before the data container is added.
Then, when you're running, use --volumes-from `$data-container-name` and it'll work. Want an article on it?
- fideloper 13y agoAwesome, thanks. I can figure it out from that example most likely, but an article would never hurt :D
- kevinschumacher 13y agoAn article on that would be great!