~edwargix/msc-link-bot

73759e539b0eff270ef70598911d83d6da858f71 — David Florness 2 years ago e25b21a
contrib: build image using local files instead of official latest
2 files changed, 7 insertions(+), 4 deletions(-)

M contrib/Dockerfile
M contrib/docker-compose.yml
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'