M contrib/Dockerfile => contrib/Dockerfile +4 -3
@@ 1,12 1,13 @@
FROM alpine AS builder
RUN apk update
-RUN apk add go olm-dev g++
-RUN go install git.hnitbjorg.xyz/~edwargix/msc-link-bot@latest
+RUN apk add g++ go make olm-dev
+COPY . .
+RUN make
FROM alpine
-COPY --from=builder /root/go/bin/msc-link-bot /usr/local/bin/msc-link-bot
+COPY --from=builder /msc-link-bot /usr/local/bin/msc-link-bot
RUN apk add olm && \
adduser -h /msclinkbot -S msclinkbot
M contrib/docker-compose.yml => contrib/docker-compose.yml +3 -1
@@ 2,7 2,9 @@ version: "3"
services:
msclinkbot:
- build: .
+ build:
+ context: ..
+ dockerfile: contrib/Dockerfile
environment:
HOMESERVER: https://matrix.example.org
USER_ID: '@msclinkbot:example.org'