initial commit
This commit is contained in:
commit
0a22899d9f
10 changed files with 358 additions and 0 deletions
42
Dockerfile
Normal file
42
Dockerfile
Normal file
|
@ -0,0 +1,42 @@
|
|||
FROM docker.io/golang:1.19.3-alpine3.17 as builder
|
||||
|
||||
ENV VERSION=v0.2.0
|
||||
|
||||
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
|
||||
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.17-3.1.3.0
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue