I'm getting started with dockers and I'm not understanding something. I'm just using a docker-compose to use the base image of PostgreSQL, but i don't know how to make the data in the db persistent after killing the docker or even removing my local image. Is any of this possible?
This is my actual docker-compose.yml:
version: "3"
services:
pintaecolorea_bd:
image: postgres
environment:
POSTGRES_PASSWORD: <PASSWORD>
POSTGRES_USER: postgres
ports:
- "1234:5432"
networks:
- "service"
networks:
service:
Maybe I should use volumes? How?