Skip to content

Commit

Permalink
fix(Dockerfile): create /home/noroot directory and change ownership o…
Browse files Browse the repository at this point in the history
…f it
  • Loading branch information
lanvent committed May 9, 2023
1 parent 0bf06dd commit 2133c1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.latest
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def activate_plugins(self): # 生成新开启的插件实例
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
Expand Down

0 comments on commit 2133c1d

Please sign in to comment.