Ensemble des services de KAZ
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.6 KiB

FROM node:lts-slim
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
########################################
# APT local cache
# work around because COPY failed if no source file
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] /
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \
-e "s/deb.debian.org/${APT_MIRROR_DEBIAN}/g" \
-e "s/security.debian.org/${APT_MIRROR_DEBIAN_SECURITY}/g" \
-e "s/archive.ubuntu.com/${APT_MIRROR_UBUNTU}/g" \
-e "s/security.ubuntu.com/${APT_MIRROR_UBUNTU_SECURITY}/g" \
/etc/apt/sources.list; fi
########################################
# OLD ARG ETHERPAD_PLUGINS="ep_adminpads2 ep_align ep_chatdate ep_colors ep_subscript_and_superscript ep_comments_page ep_delete_empty_pads ep_headings"
# NEW ARG ETHERPAD_PLUGINS="ep_adminpads2 ep_align ep_subscript_and_superscript ep_comments_page ep_delete_empty_pads ep_headings2 convert"
ARG ETHERPAD_PLUGINS=
ARG INSTALL_ABIWORD=
ARG INSTALL_SOFFICE=true
ENV NODE_ENV=production
ARG EP_HOME=
ARG EP_UID=5001
ARG EP_GID=0
ARG EP_SHELL=
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
useradd --system ${EP_UID:+--uid "${EP_UID}" --non-unique} --gid etherpad \
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
${EP_SHELL:+--shell "${EP_SHELL}"} etherpad
ARG EP_DIR=/opt/etherpad-lite
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
RUN export DEBIAN_FRONTEND=noninteractive; \
mkdir -p /usr/share/man/man1 && \
apt-get -qq update && \
apt-get -qq dist-upgrade && \
apt-get -qq --no-install-recommends install \
ca-certificates \
git \
curl \
${INSTALL_ABIWORD:+abiword} \
${INSTALL_SOFFICE:+libreoffice} \
&& \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/*
USER etherpad
WORKDIR "${EP_DIR}"
COPY --chown=etherpad:0 git/etherpad-lite/ ./
RUN src/bin/installDeps.sh && rm -rf ~/.npm/_cacache
# RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
# npm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
# src/bin/installDeps.sh && \
# rm -rf ~/.npm
RUN [ -z "${ETHERPAD_PLUGINS}" ] || for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}" || exit 1; done
# Copy the configuration file.
COPY --chown=etherpad:etherpad dockers/etherpad/config/settings.json.docker "${EP_DIR}"/settings.json
# Fix permissions for root group
RUN chmod -R g=u .
HEALTHCHECK --interval=20s --timeout=3s CMD curl -f http://localhost:9001 || exit 1
EXPOSE 9001
CMD ["node", "--experimental-worker", "node_modules/ep_etherpad-lite/node/server.js"]