- Create a postgres docker container with below command - docker run -v /home/ec2-user/Vteck-postgres-data:/var/lib/postgresql/data -d -e POSTGRES_USER=odoo POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name vteck-db postgres
- access to docker container - docker exec -it vteck-db bash
- root@f1ba565db798:/# psql -U postgres psql: error: could not connect to server: FATAL: role "postgres" does not exist
but if I create docker container with - docker run --rm -d -e POSTGRES_PASSWORD=root --name postgres postgres, I can successfully access into psql with psql - U postgres.
Any problem on my step 1's command?