Skip to content
Discussion options

You must be logged in to vote

Great questions - let me go through each one.

  1. Do Podman/Docker create volumes automatically if none are specified?Yes, but only if the image declares a VOLUME instruction in its Dockerfile. Both postgres and pgadmin4 do this - so out of the box, they get anonymous volumes (random hashes like a3f9b2c1...). These persist across podman compose down restarts, but are easy to accidentally orphan.

  2. Did adding the volumes: section cause data loss?Most likely yes, but not because containers "rebuilt" - the image layers stay the same. What probably happened is that your new bind mount shadowed the anonymous volume that was previously holding your data. When Podman saw a new mount point for /var…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@enricojr01
Comment options

@de-lazurenko
Comment options

@enricojr01
Comment options

Answer selected by enricojr01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants