I've been struggling with a Docker issue where I'm unable to generate containers in Portainer due to permission errors. Specifically, I'm trying to run containers while following the Docker Compose instructions closely, but multiple containers indicate that the user with ID 1000:1000 lacks the necessary permissions to create or modify files.
Here's what I've attempted so far: I've added the user to the Docker group. I also tried changing the owner of the configuration folder used by the containers, but it stays as root since this folder is mounted from another server. I've made sure to mount the folder with read-write permissions and launched the container using the user option 1000:1000.
Despite spending hours searching for solutions, I'm still stuck. I'm sharing a snippet of my Docker Compose file below for reference:
services:
heimdall:
image: lscr.io/linuxserver/heimdall:latest
container_name: heimdall
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- ALLOW_INTERNAL_REQUESTS=false
volumes:
- /netmount/Data/heimdall/config:/config
ports:
- 80:80
- 443:443
user: 1000:1000
restart: unless-stopped
Any advice on resolving this issue would be greatly appreciated!
2 Answers
It sounds like you might be facing issues because that folder is mounted from another server. When you do this, permission problems can arise, especially depending on how that folder is exported and mounted. You need to check both the server settings and the Docker configuration to ensure they align properly. If you're able, you could try running the container in privileged mode without the custom UID/GID unless absolutely necessary. Sometimes just redeploying the container can sort things out as well. Good luck!
Yeah, it's important to provide the correct UID/GID settings! If you're still facing challenges, make sure to use the command 'id' in the terminal to check the user ID you're operating under and match that in your Docker settings. Let us know what output you get.

Thanks for the clarification! I’ll keep that in mind.