Chapter 6: Testing with PostgreSQL

I try to run the following command from chapter 6

docker run --name postgres -e POSTGRES_DB=vapor \
-p 5432:5432 -d postgres

But I get

Unable to find image 'postgres:latest' locally
docker: Error response from daemon: Get unauthorized: incorrect username or password.
See 'docker run --help'.

Docker was just installed, followed the instructions from earlier in the same chapter. I did not try the SQLite or MySQL sections, because I just wanted to focus on the PostgreSQL section.

Ok, I figured out a solution to this. I logged out my Docker user, and created a new one. Then it just worked. Tried to log in again with the old user, and got the same error message. So old accounts are not compatible with the latest Docker Desktop I guess…

@gjzwart Really glad you sorted it out. Cheers! :]

I’m probably not the only experiencing problems from time to time, so it could be of use to put the solution out here anyway.

1 Like