79401284

Date: 2025-01-30 21:39:37
Score: 2
Natty:
Report link

I tried what the post indicated The other answer ..., but it didn't work, the error kept appearing.

So I found this article, where I used "Option 2: Use a Docker Volume Instead of a Bind Mount", PostgreSQL: How to resolve “Permission denied” when bringing up service in Docker container — ep2

services:
  db:
    image: postgres:latest
    container_name: postgres_db
    environment:
      POSTGRES_USER: myuser
      POSTGRES_PASSWORD: mypassword
      POSTGRES_DB: mydatabase
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
    driver: local
Reasons:
  • Blacklisted phrase (1): this article
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: dixoen