Ran and persisted a stateful Postgres service entirely through Docker Desktop — pulled postgres:16, created a named volume, launched a container with a published port and mounted volume, seeded a table over the Exec tab, proved the data survived a restart, then reached it from a second Adminer container over the network.
Current operation
Do everything through the Docker Desktop app — the Images, Volumes, and Containers tabs
and each container's Logs, Files, and Exec tabs. The only step outside Docker
Desktop is opening a browser for Adminer. No docker commands typed in your own shell.
postgres:16 — the specific tag, not latest.shopdata.postgres:16 and open Optional settings. Set: /var/lib/postgresql/data Then run it. It should appear running in the Containers tab.shop-db5432 (mapped to the container's 5432)POSTGRES_PASSWORD = devpassshopdata volume at container pathdatabase system is ready to accept connections.psql -U postgres. Type these in by hand (don't paste), confirming each: `sql CREATE TABLE products (id serial primary key, name text, price int); INSERT INTO products (name, price) VALUES ('Mug', 1299), ('Bottle', 1899); SELECT * FROM products; `/var/lib/postgresql/data — the database files stored there are what the shopdata volume is holding onto.SELECT * FROM products; — the two rows should still be there. That's the named volume doing its job: the data outlived the container restart.adminer, then Run it with Host port 8080. Open http://localhost:8080 in a browser and log in with System: PostgreSQL, Server: host.docker.internal, Username: postgres, Password: devpass. Open the products table — you should see your two rows, now served to a separate container over the network.These criteria define the outcome each recording is checked against.