I have following docker-compose.yml:
version: '3.5'
services:
postgres:
container_name: my_container
image: postgres:9.6.16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-xxxx}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-xxxx}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "31338:5432"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
This is docker image with empty postgres database. It initializes and works fine, the only thing I don't like is how it looks like in Docker Dashboard:
There is db parent folder which is the name of the folder the docker-compose.yml is located in. I would like to avoid this parent folder.
What should I change in my docker-compose.yml to get rid of parent folder?
