I need concrete help to create volumes in Docker Compose

I have already opened many discussions on these volumes and I have read the documentation but I still have a lot of problems. I need concrete help to understand how to create these volumes in the right way. If you want to help me, I’m here and I thank you infinitely.
I use these images:

FROM openjdk:11.0.15-jre-slim
FROM dpage/pgadmin4:6.10
FROM kartoza/postgis:14-3.2-v2022.05.09
FROM postgres:14.3-alpine3.16

Find two similar images for the database because in reality the projects I’m creating are 2. On one project I need postgis and on the other I don’t.
I only have problems with the database image. The rest works.
The problems I encounter are the following:

  1. Locally when I delete the containers, the images and recreate both I also execute the following command:
    docker volume ls
    I notice that the volumes are more and more numerous each time. I believe Docker creates new volumes every time.
  2. When I try to download the database volume from Real Cloud with FileZilla (this does not happen for the other volumes) the program writes me:
Error: Directory/home/ubuntu/ServerDockerJava01/volumes/data-postgresql/14/main: permission denied
Error: Failed to retrieve directory listing
  1. Docker continually creates this folder but I didn’t tell you to:
  2. When I connect to linux the operating system asks me for the root password (see attached photo).
    Screenshot from 2022-06-11 18-39-08
  3. With ‘postgres: 14.3-alpine3.16’ I can’t use ‘target: /var/lib/postgresql’ but I have to use ‘target: /var/lib/postgresql/data’. It is possible to create the volume of the folder ‘postgresql’ and not of the folder ‘data’.
  4. When I stop the linux VM that I use locally on vmware and on which I try docker and then I turn it back on I have to delete all containers and all images and then recreate everything otherwise I get database connection problems.
    How can I do this?
    My code:
version: '3.9'
    build: ./postgresql-postgis
    image: image-postgresql-postgis-eb:v.1.0
    container_name: container-postgresql-postgis-eb
      - 5432:5432
      - type: bind
        source: ./volumes/data-postgresql
        target: /var/lib/postgresql/data
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "password"
      POSTGRES_DB: "nomedb"
      ALLOW_IP_RANGE: ""
    restart: always
      - eb
      - type: bind
        source: ./volumes/data-pgadmin/servers.json
        target: /pgadmin4/servers.json
      PGADMIN_DEFAULT_EMAIL: admin@gmail.com
      - type: bind
        source: ./volumes/data-java
        target: /appfolder

Dockerfile for DB:

FROM postgres:14.3-alpine3.16
# FROM kartoza/postgis:14-3.2--v2022.05.09