User IDs from command line
Many Docker containers need UserID and GroupID.
The environment variables can be slightly different for each compose file, e.g: PUID, UID, GUID, GID or similar.
The ID numbers can vary depending on your operating system. On my Synology NAS, both IDs = 1026. On my minipc, both IDs = 1000.
There are various methods to find these ID numbers, but the easiest is to just SSH into the device you will be running the container on and type the following command:
id
you don't even need to put 'id' in capital letters.
You should get an output, something like this:
From that specific output, you can see my userID=1000 and my groupID=1000
From my Synology, I get:
which is curious, because it says my groupID is 100. I am sure it was also 1026.
To get the two lines of output above, including the SSH with passwords it took me all of 60seconds.
There are certain options you can use with the 'id' command, but rather than list them, you can use the following command and the list will appear before you:
id --help
No Comments