# Builder FROM --platform=$BUILDPLATFORM node:22-bullseye as builder # Support custom branch of the js-sdk. This also helps us build images of element-web develop. 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 . /src RUN /src/scripts/docker-link-repos.sh RUN yarn --network-timeout=200000 install RUN /src/scripts/docker-package.sh # 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 nginx:alpine-slim COPY --from=builder /src/webapp /app # Override default nginx config COPY /nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html