From 2133c1d6afee5f5f92d201c41994f950a77b9aed Mon Sep 17 00:00:00 2001 From: lanvent Date: Tue, 9 May 2023 23:08:20 +0800 Subject: [PATCH] fix(Dockerfile): create /home/noroot directory and change ownership of it --- docker/Dockerfile.debian | 3 ++- docker/Dockerfile.latest | 3 ++- plugins/plugin_manager.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 798642d..7f6e164 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -31,9 +31,10 @@ WORKDIR ${BUILD_PREFIX} ADD ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh \ + && mkdir -p /home/noroot \ && groupadd -r noroot \ && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \ - && chown -R noroot:noroot ${BUILD_PREFIX} + && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} USER noroot diff --git a/docker/Dockerfile.latest b/docker/Dockerfile.latest index 7f2d6ae..a9833ed 100644 --- a/docker/Dockerfile.latest +++ b/docker/Dockerfile.latest @@ -25,9 +25,10 @@ WORKDIR ${BUILD_PREFIX} ADD docker/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh \ + && mkdir -p /home/noroot \ && groupadd -r noroot \ && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \ - && chown -R noroot:noroot ${BUILD_PREFIX} + && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} USER noroot diff --git a/plugins/plugin_manager.py b/plugins/plugin_manager.py index d2ee75e..d8ad2c3 100644 --- a/plugins/plugin_manager.py +++ b/plugins/plugin_manager.py @@ -123,7 +123,7 @@ class PluginManager: try: instance = plugincls() except Exception as e: - logger.error("Failed to init %s, diabled. %s" % (name, e)) + logger.exception("Failed to init %s, diabled. %s" % (name, e)) self.disable_plugin(name) failed_plugins.append(name) continue