I'm trying to set up pgAdmin4 using Docker, and I keep running into an issue when I try to specify a volume mount. Here's what my configuration looks like:
```yaml
services:
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin4
restart: unless-stopped
user: 1003:1003
ports:
- 80:80
environment:
PGADMIN_DEFAULT_EMAIL:
PGADMIN_DEFAULT_PASSWORD:
volumes:
- /docker/pgadmin4:/var/lib/pgadmin
```
When I check the logs, I see the following error: `KeyError: 'getpwuid(): uid not found: 1003'`. It works fine when I don't use a volume mount, but I really want to save my configurations instead of using an anonymous volume. Any ideas on what might be going wrong?
1 Answer
The error message is pretty straightforward: it’s telling you the UID you provided doesn’t exist. You might be able to resolve this by either adjusting the UID to match a valid user in the pgAdmin container or creating a new user on your host to ensure that it’s aligned with what pgAdmin expects in the container.

The other commenter did point out a valid concern. My UID does exist on the host; it just seems like the container is expecting something different, maybe 5050?