Files
ThreadNet-Web/Dockerfile
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.6 KiB
Docker
Raw Normal View History

2025-11-25 18:24:10 +00:00
# syntax=docker.io/docker/dockerfile:1.20-labs@sha256:dbcde2ebc4abc8bb5c3c499b9c9a6876842bf5da243951cd2697f921a7aeb6a9
# Builder
2025-11-25 15:41:40 +00:00
FROM --platform=$BUILDPLATFORM node:24-bullseye@sha256:b36a1eab6bdeb43cf4808370d18b6706452e810e3563b1ce669d2965af3c0464 AS builder
2024-10-15 14:57:26 +01:00
# Support custom branch of the js-sdk. This also helps us build images of element-web develop.
2019-04-10 15:47:02 -06:00
ARG USE_CUSTOM_SDKS=false
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
ARG JS_SDK_BRANCH="master"
WORKDIR /src
COPY --exclude=docker . /src
RUN /src/scripts/docker-link-repos.sh
2023-05-16 09:43:02 +01:00
RUN yarn --network-timeout=200000 install
RUN /src/scripts/docker-package.sh
2019-04-10 15:47:02 -06:00
# Copy the config now so that we don't create another layer in the app image
RUN cp /src/config.sample.json /src/webapp/config.json
# App
FROM nginxinc/nginx-unprivileged:alpine-slim@sha256:8e23ab31c214ee1d7f832d63b2ee768d5cbc270a94a2cba0752fed93ad83e345
# Need root user to install packages & manipulate the usr directory
USER root
# Install jq and moreutils for sponge, both used by our entrypoints
RUN apk add jq moreutils
COPY --from=builder /src/webapp /app
# Override default nginx config. Templates in `/etc/nginx/templates` are passed
# through `envsubst` by the nginx docker image entry point.
COPY /docker/nginx-templates/* /etc/nginx/templates/
COPY /docker/docker-entrypoint.d/* /docker-entrypoint.d/
2021-09-28 12:15:34 +01:00
RUN rm -rf /usr/share/nginx/html \
2021-06-23 15:42:30 +03:00
&& ln -s /app /usr/share/nginx/html
2025-01-03 22:54:52 +00:00
# Run as nginx user by default
USER nginx
# HTTP listen port
ENV ELEMENT_WEB_PORT=80
2025-02-25 09:16:22 +00:00
2025-03-11 18:04:33 +00:00
HEALTHCHECK --start-period=5s CMD wget -q --spider http://localhost:$ELEMENT_WEB_PORT/config.json