From 50f56ccf3d5b84e3909ab8b560e9bdf4397e4ac8 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 1 Dec 2020 22:22:26 +0800 Subject: [PATCH] allow execute any command when using docker run --- docker/docker-entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 80fe2957..dfe580e6 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -25,4 +25,8 @@ if [ "${LAB_CONF_PATH}" != "" ]; then conf_path_param="--conf-path=${LAB_CONF_PATH}"; fi -exec su-exec ${LAB_USER} /usr/local/bin/labapp/lab server run ${conf_path_param}; +if [ $# -gt 0 ]; then + exec "$@" +else + exec su-exec ${LAB_USER} /usr/local/bin/labapp/lab server run ${conf_path_param}; +fi