Can I build a docker image from an existing database container?
<p>I am new to docker. I am using docker compose to manage containers. </p>

<p>My goal is to have a database container persists or not persist data, which can be pulled by other developers without many manual steps (pg_dump and pg_store etc) to run their dev environment locally.</p>

<p>I want to know if I can build a docker image of a snapshot of a database (postgres). Is this possible? If not, what is the recommended way to do this with docker? </p>

<p>Thank you.</p>