1
0
mirror of https://github.com/tommytran732/Matrix.to-Docker synced 2024-11-23 18:21:33 -05:00
Matrix.to-Docker/Dockerfile

37 lines
803 B
Docker
Raw Permalink Normal View History

FROM node:alpine
LABEL maintainer="Thien Tran contact@tommytran.io"
ARG UID=992
ARG GID=992
2024-08-11 15:50:01 -04:00
COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
RUN apk -U upgrade \
&& apk --no-cache add git \
&& adduser -g ${GID} -u ${UID} --disabled-password --gecos "" matrix-to
USER matrix-to
WORKDIR /home/matrix-to
RUN git clone https://github.com/matrix-org/matrix.to
COPY element.patch /home/matrix-to/matrix.to
WORKDIR /home/matrix-to/matrix.to
RUN git apply /home/matrix-to/matrix.to/element.patch \
&& rm -rf .git \
&& rm -rf yarn.lock \
&& yarn \
&& yarn cache clean \
&& yarn build
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
EXPOSE 5000
ENTRYPOINT ["yarn", "start"]