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/matrix-line # beeper/line publishes no image. ffmpeg converts images and makes video thumbnails for LINE. FROM alpine:3.22@sha256:5291449c3df73caf6ed85e649dec1b9e818b39a5d8c871e97afc13e9cd5e8fa8 RUN apk add --no-cache ca-certificates tzdata ffmpeg COPY --from=builder /out/matrix-line /usr/bin/matrix-line # Without the seal key (XESSENGER_SEAL_KEY_FILE) the bridge keeps an encrypted copy of its LINE keys at the relative # path data/: from / that is the /data volume. With it the keys stay in the sealed login only. WORKDIR /