2023-03-16 20:39:59 -04:00
|
|
|
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"
|
|
|
|
|
2023-03-16 20:39:59 -04:00
|
|
|
RUN apk -U upgrade \
|
2024-05-30 14:40:27 -04:00
|
|
|
&& apk --no-cache add git \
|
|
|
|
&& adduser -g ${GID} -u ${UID} --disabled-password --gecos "" matrix-to
|
2023-03-16 20:39:59 -04:00
|
|
|
|
|
|
|
USER matrix-to
|
2023-03-16 20:43:28 -04:00
|
|
|
|
|
|
|
WORKDIR /home/matrix-to
|
|
|
|
|
|
|
|
RUN git clone https://github.com/matrix-org/matrix.to
|
|
|
|
|
2023-03-16 21:56:26 -04:00
|
|
|
COPY element.patch /home/matrix-to/matrix.to
|
|
|
|
|
2023-03-16 20:43:28 -04:00
|
|
|
WORKDIR /home/matrix-to/matrix.to
|
|
|
|
|
2023-03-16 21:56:26 -04:00
|
|
|
RUN git apply /home/matrix-to/matrix.to/element.patch \
|
2024-05-30 14:40:27 -04:00
|
|
|
&& rm -rf .git \
|
2024-06-12 05:37:55 -04:00
|
|
|
&& rm -rf yarn.lock \
|
2024-05-30 14:40:27 -04:00
|
|
|
&& yarn \
|
2024-06-12 05:37:55 -04:00
|
|
|
&& yarn cache clean \
|
2024-05-30 14:40:27 -04:00
|
|
|
&& yarn build
|
|
|
|
|
|
|
|
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
|
2023-03-16 20:43:28 -04:00
|
|
|
|
2023-03-16 20:39:59 -04:00
|
|
|
EXPOSE 5000
|
|
|
|
|
|
|
|
ENTRYPOINT ["yarn", "start"]
|