matrix-bridge-whatsapp/Containerfile

43 lines
927 B
Text
Raw Permalink Normal View History

2025-05-22 11:36:39 +02:00
FROM docker.io/golang:1.24-alpine3.21 as builder
2018-11-27 13:12:34 +01:00
2025-05-22 11:36:39 +02:00
ENV VERSION=v0.12.1
2019-03-27 18:33:54 +01:00
2018-11-27 13:12:34 +01:00
RUN apk --no-cache add \
2022-11-18 09:25:26 +01:00
git \
gcc \
olm-dev \
libc-dev \
musl-dev
2018-11-27 13:12:34 +01:00
2020-07-08 20:44:47 +02:00
RUN ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so
2019-02-15 13:38:00 +01:00
WORKDIR /build
RUN git clone https://github.com/tulir/mautrix-whatsapp.git
WORKDIR /build/mautrix-whatsapp
2019-03-27 18:33:54 +01:00
RUN git checkout $VERSION
2019-02-15 13:38:00 +01:00
2024-11-01 09:05:18 +01:00
RUN go build -o /build/bin/mautrix-whatsapp /build/mautrix-whatsapp/cmd/mautrix-whatsapp/
2018-11-27 13:12:34 +01:00
2025-01-10 14:38:46 +01:00
FROM docker.io/thallian/confd-env:3.21-3.2.0.2
2018-11-27 13:12:34 +01:00
RUN addgroup -g 2222 matrix-bridge
RUN adduser -h /var/lib/matrix-bridge -u 2222 -D -G matrix-bridge matrix-bridge
2019-02-15 13:38:00 +01:00
COPY --from=builder /build/bin/mautrix-whatsapp /bin/mautrix-whatsapp
2018-11-27 13:12:34 +01:00
2020-07-08 18:15:18 +00:00
RUN apk --no-cache add \
2022-11-18 09:25:26 +01:00
ca-certificates \
libstdc++ \
2023-07-31 12:02:17 +02:00
olm
2018-11-27 13:39:11 +01:00
2018-11-27 13:12:34 +01:00
WORKDIR /var/lib/matrix-bridge
RUN mkdir /var/lib/matrix-bridge/data
ADD /rootfs /
RUN chown -R matrix-bridge:matrix-bridge /var/lib/matrix-bridge
ENV HOME /var/lib/matrix-bridge
2018-11-27 13:39:11 +01:00
EXPOSE 8080