ARG REPO_LOCATION # ARG BASE_VERSION FROM ${REPO_LOCATION}minideb-node AS builder RUN install_packages git ca-certificates python3 make gcc g++ libc-dev libc++-dev RUN mkdir -p /srv && git clone --branch master https://github.com/ether/etherpad-lite.git /srv/etherpad ENV PYTHON /usr/bin/python3 RUN cd /srv/etherpad \ && ln -s /usr/bin/python3 /usr/bin/python \ && npm install \ && npm install sqlite3 \ && rm -rf /srv/etherpad/.git # The rm -rf there is to save some space in the resulting container ############################################################################### FROM ${REPO_LOCATION}minideb-node COPY --from=builder /srv/etherpad /srv/etherpad COPY settings.json /srv/etherpad/ RUN mkdir -p /.npm && chown -R 70:70 /.npm /srv/etherpad USER 70:70 ENV NODE_ENV production WORKDIR /srv/etherpad ENTRYPOINT [ "/srv/etherpad/bin/run.sh" ]