Docker: Add arg for the Etherpad directory
This makes it possible for users to match the directory inside the container to the host system (for convenience or to avoid confusion).pull/4922/head
parent
34d9069874
commit
c07bfe10bd
|
@ -52,7 +52,8 @@ RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
|
|||
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
|
||||
${EP_SHELL:+--shell "${EP_SHELL}"} etherpad
|
||||
|
||||
RUN mkdir /opt/etherpad-lite && chown etherpad:etherpad /opt/etherpad-lite
|
||||
ARG EP_DIR=/opt/etherpad-lite
|
||||
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
|
||||
|
||||
# install abiword for DOC/PDF/ODT export
|
||||
RUN [ -z "${INSTALL_ABIWORD}" ] || (apt update && apt -y install abiword && apt clean && rm -rf /var/lib/apt/lists/*)
|
||||
|
@ -63,7 +64,7 @@ RUN [ -z "${INSTALL_SOFFICE}" ] || (apt update && mkdir -p /usr/share/man/man1 &
|
|||
|
||||
USER etherpad
|
||||
|
||||
WORKDIR /opt/etherpad-lite
|
||||
WORKDIR "${EP_DIR}"
|
||||
|
||||
COPY --chown=etherpad:etherpad ./ ./
|
||||
|
||||
|
@ -78,7 +79,7 @@ RUN src/bin/installDeps.sh && \
|
|||
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}" || exit 1; done
|
||||
|
||||
# Copy the configuration file.
|
||||
COPY --chown=etherpad:etherpad ./settings.json.docker /opt/etherpad-lite/settings.json
|
||||
COPY --chown=etherpad:etherpad ./settings.json.docker "${EP_DIR}"/settings.json
|
||||
|
||||
# Fix group permissions
|
||||
RUN chmod -R g=u .
|
||||
|
|
Loading…
Reference in New Issue