FROM golang:1.27.2-alpine@sha256:f92b6ef800e499660581efdabdf25d9d817a9d124eaf900924f0504e7e27e12d AS builder RUN apk add --no-cache python3 patch build-base # The pinned upstream compiles in a layer of its own, before the patches: when only a patch changes, the build # below starts from this layer's Go build cache and recompiles just the packages the patches touch. COPY build.py upstream.json /source/ RUN python3 /source/build.py --warm # services/bridgekit, which every bridge is built with, comes in as the named build context bridgekit # (compose.local.yaml, docker-bake.hcl, infra/scripts/release.py). COPY --from=bridgekit . /bridgekit ENV XESSENGER_BRIDGEKIT=/bridgekit COPY . /source RUN python3 /source/build.py --output /out/mautrix-meta FROM dock.mau.dev/mautrix/meta:v0.2609.0@sha256:a8538857cc2b06c01854c1bc7ddaa0eb0975a9da4aefb4a70af907b0cad16b6b COPY --from=builder /out/mautrix-meta /usr/bin/mautrix-meta