This is an Alpine Linux or Minimal Alpine Linux image with glibc based image that bundles tzdata, su-exec, and some useful entrypoint scripts.
-
Creates/updates user with userid, group, groupid and home directory. The group and the home directory are assigned to the user, with shell set based on values of environment variable
ENOLOGIN
(see below for more info).User created/updated from environment variable
EUSER
(defaultdocker-user
), with uid from environment variableEUID
(default1001
).Group created/updated from environment variable
EGROUP
(defaultdocker-group
), with gid from environment variableEGID
(default1001
).Home directory created/updated from environment variable
EHOME
(default/home/docker-user
).If variable
ENOLOGIN
equals yes then use/sbin/nologin
as shell, else use default shell (/bin/sh
).If variable
ECHOWNHOME
equals yes then the home directory will be chown'ed toEUSER
:EGROUP
-
Chown directories in
ECHOWNDIRS
, create them if not exist. Chown files inECHOWNFILES
, create them if not exist.
-
entrypoint-su-exec [command] [params...]
First creates/updates user, group and home directory, by executing
set-user-group-home
. Then usessu-exec
to exec$ENTRYPOINT_COMMAND
with the given parameters as the user$EUSER
.
-
entrypoint-exec [command] [params...]
First creates/updates user, group and home directory, by executing
set-user-group-home
. Then usesexec
to exec$ENTRYPOINT_COMMAND
with the given parameters (asroot
).
-
entrypoint-crond [params...]
First creates/updates user, group and home directory, by executing
set-user-group-home
. Then sets the crontab file$CROND_CRONTAB
as the crontab of the user$EUSER
. Finally executescrond
with the given parameters.