2020-07-08 18:44:47 +00:00
|
|
|
FROM golang:1-alpine3.12 as builder
|
2018-11-27 12:12:34 +00:00
|
|
|
|
2020-12-10 08:39:27 +00:00
|
|
|
ENV VERSION=v0.1.4
|
2019-03-27 17:33:54 +00:00
|
|
|
|
2018-11-27 12:12:34 +00:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
git \
|
|
|
|
gcc \
|
2020-07-08 18:15:18 +00:00
|
|
|
olm-dev \
|
2020-07-08 18:44:47 +00:00
|
|
|
libc-dev \
|
2018-11-27 12:12:34 +00:00
|
|
|
musl-dev
|
|
|
|
|
2020-07-08 18:44:47 +00:00
|
|
|
RUN ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so
|
|
|
|
|
2019-02-15 12:38:00 +00:00
|
|
|
WORKDIR /build
|
|
|
|
RUN git clone https://github.com/tulir/mautrix-whatsapp.git
|
|
|
|
WORKDIR /build/mautrix-whatsapp
|
2019-03-27 17:33:54 +00:00
|
|
|
RUN git checkout $VERSION
|
2019-02-15 12:38:00 +00:00
|
|
|
|
|
|
|
RUN go build -o /build/bin/mautrix-whatsapp
|
2018-11-27 12:12:34 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-02-15 12:38:00 +00:00
|
|
|
COPY --from=builder /build/bin/mautrix-whatsapp /bin/mautrix-whatsapp
|
2018-11-27 12:12:34 +00:00
|
|
|
|
2020-07-08 18:15:18 +00:00
|
|
|
RUN apk --no-cache add \
|
2020-07-08 18:17:14 +00:00
|
|
|
ca-certificates \
|
|
|
|
libstdc++
|
2020-07-08 18:15:18 +00:00
|
|
|
|
2020-07-08 18:44:47 +00:00
|
|
|
RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community add \
|
2020-07-08 18:15:18 +00:00
|
|
|
olm
|
2018-11-27 12:39:11 +00:00
|
|
|
|
2018-11-27 12:12:34 +00: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 12:39:11 +00:00
|
|
|
EXPOSE 8080
|