diff --git a/Dockerfile b/Dockerfile index 50996126..4ff9f2ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,13 +25,13 @@ ENV NODE_ENV=development # that do not allow images running as root. RUN useradd --uid 5001 --create-home etherpad -RUN mkdir /opt/etherpad-lite && chown etherpad:etherpad /opt/etherpad-lite +RUN mkdir /opt/etherpad-lite && chown etherpad:0 /opt/etherpad-lite -USER etherpad:etherpad +USER etherpad WORKDIR /opt/etherpad-lite -COPY --chown=etherpad:etherpad ./ ./ +COPY --chown=etherpad:0 ./ ./ # install node dependencies for Etherpad RUN bin/installDeps.sh && \ @@ -44,7 +44,10 @@ RUN bin/installDeps.sh && \ RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}"; done # Copy the configuration file. -COPY --chown=etherpad:etherpad ./settings.json.docker /opt/etherpad-lite/settings.json +COPY --chown=etherpad:0 ./settings.json.docker /opt/etherpad-lite/settings.json + +# Fix permissions for root group +RUN chmod -R g=u . EXPOSE 9001 CMD ["node", "node_modules/ep_etherpad-lite/node/server.js"]