2020-09-26 13:56:36 +00:00
|
|
|
ARG REPO_LOCATION
|
|
|
|
# ARG BASE_VERSION
|
|
|
|
|
2021-03-17 01:27:00 +00:00
|
|
|
FROM ${REPO_LOCATION}minideb-node AS builder
|
|
|
|
|
|
|
|
# This is release 1.8.12
|
|
|
|
# It's important we checkout a specific commit, otherwise etherpad checks out the latest from develop O.o
|
|
|
|
ARG COMMIT=b99c2cae22f35a0c0831e2fef0719f115b486bd9
|
2020-09-26 13:56:36 +00:00
|
|
|
|
2021-04-18 12:10:25 +00:00
|
|
|
RUN install_packages git ca-certificates curl
|
|
|
|
|
2020-09-26 13:56:36 +00:00
|
|
|
|
2021-03-17 01:27:00 +00:00
|
|
|
RUN mkdir -p /srv \
|
2021-04-18 12:10:25 +00:00
|
|
|
&& curl -sSL -o /srv/nvm_install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \
|
2021-03-17 01:27:00 +00:00
|
|
|
&& git clone --branch master https://github.com/ether/etherpad-lite.git /srv/etherpad \
|
|
|
|
&& cd /srv/etherpad && git checkout "${COMMIT}" \
|
|
|
|
&& git status
|
2020-09-26 13:56:36 +00:00
|
|
|
|
2021-03-17 02:17:55 +00:00
|
|
|
###############################################################################
|
|
|
|
|
2021-04-18 12:10:25 +00:00
|
|
|
FROM ${REPO_LOCATION}minideb
|
2021-03-17 02:17:55 +00:00
|
|
|
|
2021-04-18 12:10:25 +00:00
|
|
|
COPY --from=builder /srv/nvm_install.sh /srv/nvm_install.sh
|
2021-03-17 02:17:55 +00:00
|
|
|
COPY --from=builder /srv/etherpad /srv/etherpad
|
|
|
|
COPY settings.json /srv/etherpad/
|
2020-09-26 14:50:11 +00:00
|
|
|
ENV PYTHON /usr/bin/python3
|
|
|
|
|
2021-04-18 12:10:25 +00:00
|
|
|
# lts-erbium = Node.js 12.x
|
|
|
|
# We speculate that our problems with Etherpad are because we're using a newer version of Node.js..... :-/
|
|
|
|
# nvm needs curl to download versions of Node.js
|
|
|
|
|
|
|
|
RUN install_packages ca-certificates curl \
|
|
|
|
&& mkdir -p /.npm \
|
|
|
|
&& bash /srv/nvm_install.sh \
|
|
|
|
&& nvm install lts/erbium \
|
|
|
|
&& cd /srv/etherpad \
|
2021-03-17 03:10:17 +00:00
|
|
|
&& install_packages python3 make gcc g++ libc-dev libc++-dev \
|
2020-09-26 15:09:47 +00:00
|
|
|
&& ln -s /usr/bin/python3 /usr/bin/python \
|
2021-03-17 02:17:55 +00:00
|
|
|
&& src/bin/installDeps.sh \
|
2020-09-27 19:23:05 +00:00
|
|
|
&& npm install sqlite3 \
|
2021-03-18 23:57:55 +00:00
|
|
|
&& rm -rf /srv/etherpad/.git /.npm/_cacache \
|
|
|
|
&& chown -R 70:70 /.npm /srv/etherpad
|
2020-09-27 19:23:05 +00:00
|
|
|
|
|
|
|
# The rm -rf there is to save some space in the resulting container
|
2020-09-26 13:56:36 +00:00
|
|
|
|
2020-09-27 12:20:39 +00:00
|
|
|
|
2020-09-26 13:59:25 +00:00
|
|
|
USER 70:70
|
2020-09-26 13:56:36 +00:00
|
|
|
|
2020-09-26 14:12:46 +00:00
|
|
|
ENV NODE_ENV production
|
2020-09-26 13:56:36 +00:00
|
|
|
WORKDIR /srv/etherpad
|
2020-09-26 23:17:08 +00:00
|
|
|
ENTRYPOINT [ "/srv/etherpad/bin/run.sh" ]
|