forked from matterbridge-org/matterbridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (15 loc) · 724 Bytes
/
Dockerfile
File metadata and controls
19 lines (15 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM golang:alpine AS builder
# allow to cache the go mod download
COPY go.mod go.sum ./
RUN go mod download
COPY . /go/src/matterbridge
RUN apk --no-cache add git gcc musl-dev
RUN cd /go/src/matterbridge && \
CGO_ENABLED=1 go build -tags goolm -ldflags "-X github.com/matterbridge-org/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
FROM alpine
RUN apk --no-cache add ca-certificates mailcap
COPY --from=builder /bin/matterbridge /bin/matterbridge
RUN mkdir /etc/matterbridge \
&& touch /etc/matterbridge/matterbridge.toml \
&& ln -sf /matterbridge.toml /etc/matterbridge/matterbridge.toml
ENTRYPOINT ["/bin/matterbridge", "-conf", "/etc/matterbridge/matterbridge.toml"]