This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Common User List
Jerome Guibert edited this page Dec 22, 2016
·
6 revisions
See How Managing user in docker container.
For all defined user, we will start id from 4200. In the range 1000-29999 dedicated for dynamically allocated user accounts. All of them are ever define in our docker base image.
Image | User:Group | User Identifier | Group Identifier |
---|---|---|---|
airdock/redis | redis:redis | 4201 | 4201 |
airdock/elasticsearch | elasticsearch:elasticsearch | 4202 | 4202 |
airdock/mongodb | mongodb:mongodb | 4203 | 4203 |
airdock/nginx | www-data:www-data | 33 | 33 |
airdock/apache | www-data:www-data | 33 | 33 |
airdock/rabbitmq | rabbitmq:rabbitmq | 4204 | 4204 |
airdock/oracle-jdk | java:java | 4205 | 4205 |
airdock/python | py:py | 4206 | 4206 |
airdock/node | node:node | 4207 | 4207 |
airdock/* | docker:docker | 4242 | 4242 |
airdock/rvm | ruby:ruby | 4208 | 4208 |
Our user have their home directory located under "/srv" in order to take advantage of:
- most of them are created to share some data
- this will be consitent between host and guest
- they act as an application account (not an human account)
For backward compatibility, we have also a symbolink link from /var/lib/XXX to /srv/XXX.
You can, in your dockerfile use script
/root/create-user username uid groupname gid
to create username and groupname with specified id.
You can do:
sudo groupadd my-docker-group -g 4201
sudo useradd -u 4201 --home-dir /srv/my-docker-user--create-home --system --no-user-group my-docker-user
sudo usermod -g my-docker-group my-docker-user
or call this script which create all user:
create-all-user
For a convenient way to work with this new user, don't forget to add your user to this group
sudo usermod -g my-docker-group my-user
name | uid | gid |
---|---|---|
root | 0 | |
daemon | 1 | |
bin | 2 | |
sys | 3 | |
sync | 4 | |
games | 5 | |
man | 6 | |
lp | 7 | |
8 | ||
news | 9 | |
uucp | 10 | |
proxy | 13 | |
www-data | 33 | |
backup | 34 | |
list | 38 | |
irc | 39 | |
gnats | 41 | |
nobody | 65534 | |
systemd-timesync | 100 | 103 |
systemd-network | 101 | 104 |
systemd-resolve | 102 | 105 |
systemd-bus-proxy | 103 | 106 |