37 lines
788 B
Docker
37 lines
788 B
Docker
FROM golang:alpine as builder
|
|
|
|
ENV VERSION=61268f8cc4d6b6c2a9088cf46a1ccca62609494e
|
|
|
|
RUN apk --no-cache add \
|
|
git \
|
|
gcc \
|
|
musl-dev
|
|
|
|
WORKDIR /build
|
|
RUN git clone https://github.com/tulir/mautrix-whatsapp.git
|
|
WORKDIR /build/mautrix-whatsapp
|
|
RUN git checkout $VERSION
|
|
|
|
RUN go get
|
|
RUN go build -o /build/bin/mautrix-whatsapp
|
|
|
|
FROM thallian/confd-env:latest
|
|
|
|
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
|
|
|
|
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
|