matrix-bridge-discord/Containerfile
Sebastian Hugentobler 17518603c6
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Failing after 5m2s
push to 0.7.0
2024-08-04 13:35:16 +02:00

45 lines
901 B
Docker

FROM docker.io/golang:1.22-alpine3.20 as builder
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
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
ENV VERSION=v0.7.0
RUN git clone https://github.com/mautrix/discord.git
WORKDIR /build/discord
RUN git checkout $VERSION
RUN go build -o /build/bin/mautrix-discord
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-discord /bin/mautrix-discord
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