modify user of docker image

This commit is contained in:
MaysWind
2020-12-04 02:26:54 +08:00
parent 7fdbe4d1e7
commit 9c18bc650e
2 changed files with 9 additions and 23 deletions
+1 -18
View File
@@ -1,23 +1,6 @@
#!/bin/sh
set -e;
export LAB_USER=labapp;
export LAB_GROUP=labapp;
prepare_directories() {
local log_path="/var/log/labapp";
if [ "${LAB_LOG_PATH}" != "" ]; then
log_path="${LAB_LOG_PATH}";
fi
if [ ! -d "${log_path}" ]; then
mkdir ${log_path};
chown ${LAB_USER}:${LAB_GROUP} -R ${log_path};
fi
}
prepare_directories;
conf_path_param="";
@@ -28,5 +11,5 @@ fi
if [ $# -gt 0 ]; then
exec "$@"
else
exec su-exec ${LAB_USER} /usr/local/bin/labapp/lab server run ${conf_path_param};
exec /usr/local/bin/labapp/lab server run ${conf_path_param};
fi