groupme/Dockerfile

27 lines
759 B
Docker
Raw Normal View History

2020-06-23 13:40:05 +00:00
FROM golang:1-alpine3.12 AS builder
2018-08-24 20:06:55 +00:00
RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev
2018-08-26 14:29:51 +00:00
COPY . /build
2020-06-07 18:20:57 +00:00
WORKDIR /build
2018-08-26 14:29:51 +00:00
RUN go build -o /usr/bin/mautrix-whatsapp
2018-08-24 20:06:55 +00:00
2020-06-23 13:40:05 +00:00
FROM alpine:3.12
2018-08-24 20:06:55 +00:00
2020-08-14 21:50:26 +00:00
ARG TARGETARCH=amd64
ARG YQ_DOWNLOAD_ADDR=https://github.com/mikefarah/yq/releases/download/3.3.2/yq_linux_${TARGETARCH}
2020-08-14 21:10:44 +00:00
ENV UID=1337 \
GID=1337
RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq curl && \
2020-08-14 21:10:44 +00:00
curl -sLo yq ${YQ_DOWNLOAD_ADDR} && \
chmod +x yq && mv yq /usr/bin/yq
2018-08-24 20:06:55 +00:00
COPY --from=builder /usr/bin/mautrix-whatsapp /usr/bin/mautrix-whatsapp
COPY --from=builder /build/example-config.yaml /opt/mautrix-whatsapp/example-config.yaml
COPY --from=builder /build/docker-run.sh /docker-run.sh
2018-08-24 20:06:55 +00:00
VOLUME /data
CMD ["/docker-run.sh"]