mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
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).
This commit is contained in:
parent
34d9069874
commit
c07bfe10bd
1 changed files with 4 additions and 3 deletions
|
@ -52,7 +52,8 @@ RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
|
||||||
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
|
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
|
||||||
${EP_SHELL:+--shell "${EP_SHELL}"} etherpad
|
${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
|
# 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/*)
|
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
|
USER etherpad
|
||||||
|
|
||||||
WORKDIR /opt/etherpad-lite
|
WORKDIR "${EP_DIR}"
|
||||||
|
|
||||||
COPY --chown=etherpad:etherpad ./ ./
|
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
|
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}" || exit 1; done
|
||||||
|
|
||||||
# Copy the configuration file.
|
# 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
|
# Fix group permissions
|
||||||
RUN chmod -R g=u .
|
RUN chmod -R g=u .
|
||||||
|
|
Loading…
Reference in a new issue