FROM node:lts-alpine RUN apk add --update --no-cache \ dumb-init \ git \ jq WORKDIR "/home/node" ARG WIKI_PACKAGE=wiki@0.37.0 USER node RUN cd /tmp && \ git clone https://github.com/fedwiki/wiki && \ cd /tmp/wiki && \ sed -i 's@"wiki-security-passportjs": "^0.10.0"@"wiki-security-passportjs": "git+https://git.coopcloud.tech/wiki-cafe/wiki-security-passportjs"@' package.json && \ npm pack RUN npm install -g --prefix . file:/tmp/wiki/wiki-0.37.1.tgz RUN mkdir -p .wiki VOLUME "/home/node/.wiki" EXPOSE 3000 ENV PATH="${PATH}:/home/node/bin" ENV NPM_CONFIG_PREFIX="${HOME}" ENTRYPOINT ["dumb-init"] CMD ["wiki", "--farm"]