26 lines
744 B
Docker
26 lines
744 B
Docker
FROM node:alpine as builder
|
|
WORKDIR /
|
|
|
|
RUN set -e -x; \
|
|
apk add --no-cache git; \
|
|
git clone https://github.com/mattermost/matrix-as-mm.git; \
|
|
cd matrix-as-mm; \
|
|
rm -rf .git .githooks .github .vscode docker documentation e2e-tests etc; \
|
|
npm ci && npm run build --production
|
|
|
|
FROM node:alpine
|
|
|
|
ENV UID=1337 \
|
|
GID=1337
|
|
|
|
COPY --from=builder /matrix-as-mm/build/ /opt/matrix-as-mm/
|
|
COPY --from=builder /matrix-as-mm/config/ /opt/config/
|
|
COPY --from=builder /matrix-as-mm/config.sample.yaml /opt/matrix-as-mm/
|
|
COPY --from=builder /matrix-as-mm/node_modules/ /opt/matrix-as-mm/node_modules/
|
|
|
|
RUN set -e -x; \
|
|
apk add --no-cache su-exec; \
|
|
mkdir /data
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"] |