matrix-bridge-discord/Containerfile

45 lines
901 B
Plaintext
Raw Normal View History

2024-01-01 19:23:32 +00:00
FROM docker.io/golang:1.21-alpine3.19 as builder
2023-04-06 12:33:25 +00:00
2024-01-01 19:23:32 +00:00
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
2023-04-06 12:33:25 +00:00
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
2024-01-01 19:23:32 +00:00
2024-03-28 12:49:52 +00:00
ENV VERSION=v0.6.5
2023-04-06 12:33:25 +00:00
RUN git clone https://github.com/mautrix/discord.git
WORKDIR /build/discord
RUN git checkout $VERSION
RUN go build -o /build/bin/mautrix-discord
2024-01-01 19:23:32 +00:00
FROM docker.io/thallian/confd-env:3.19-3.1.6.2
2023-04-06 12:33:25 +00:00
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-discord /bin/mautrix-discord
RUN apk --no-cache add \
ca-certificates \
libstdc++ \
2023-07-31 10:06:19 +00:00
olm
2023-04-06 12:33:25 +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
EXPOSE 8080