fix(Dockerfile): create /home/noroot directory and change ownership of it
parent
0bf06ddfd3
commit
2133c1d6af
|
|
@ -31,9 +31,10 @@ WORKDIR ${BUILD_PREFIX}
|
||||||
ADD ./entrypoint.sh /entrypoint.sh
|
ADD ./entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh \
|
RUN chmod +x /entrypoint.sh \
|
||||||
|
&& mkdir -p /home/noroot \
|
||||||
&& groupadd -r noroot \
|
&& groupadd -r noroot \
|
||||||
&& useradd -r -g noroot -s /bin/bash -d /home/noroot 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
|
USER noroot
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,10 @@ WORKDIR ${BUILD_PREFIX}
|
||||||
ADD docker/entrypoint.sh /entrypoint.sh
|
ADD docker/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh \
|
RUN chmod +x /entrypoint.sh \
|
||||||
|
&& mkdir -p /home/noroot \
|
||||||
&& groupadd -r noroot \
|
&& groupadd -r noroot \
|
||||||
&& useradd -r -g noroot -s /bin/bash -d /home/noroot 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
|
USER noroot
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class PluginManager:
|
||||||
try:
|
try:
|
||||||
instance = plugincls()
|
instance = plugincls()
|
||||||
except Exception as e:
|
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)
|
self.disable_plugin(name)
|
||||||
failed_plugins.append(name)
|
failed_plugins.append(name)
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue