matrix-bridge-whatsapp/Containerfile
Sebastian Hugentobler 501431f999
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Failing after 3m57s
push to 0.11.0
2024-11-01 09:05:18 +01:00

43 lines
927 B
Docker

FROM docker.io/golang:1.22-alpine3.20 as builder
ENV VERSION=v0.11.0
RUN apk --no-cache add \
git \
gcc \
olm-dev \
libc-dev \
musl-dev
RUN ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so
WORKDIR /build
RUN git clone https://github.com/tulir/mautrix-whatsapp.git
WORKDIR /build/mautrix-whatsapp
RUN git checkout $VERSION
RUN go build -o /build/bin/mautrix-whatsapp /build/mautrix-whatsapp/cmd/mautrix-whatsapp/
FROM docker.io/thallian/confd-env:3.20-3.1.6.2
RUN addgroup -g 2222 matrix-bridge
RUN adduser -h /var/lib/matrix-bridge -u 2222 -D -G matrix-bridge matrix-bridge
COPY --from=builder /build/bin/mautrix-whatsapp /bin/mautrix-whatsapp
RUN apk --no-cache add \
ca-certificates \
libstdc++ \
olm
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
EXPOSE 8080