forked from mynaparrot/plugNmeet-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 781 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM golang:1.20-buster as builder
ARG TARGETPLATFORM
ARG TARGETARCH
RUN echo building for "$TARGETPLATFORM"
WORKDIR /go/src/app
COPY go.mod go.mod
COPY go.sum go.sum
# download if above files changed
RUN go mod download
# Copy the go source
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY version/ version/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on go build -ldflags '-w -s -buildid=' -a -o plugnmeet-server ./cmd/server
FROM debian:buster-slim
RUN export DEBIAN_FRONTEND=noninteractive; \
apt update && \
apt install --no-install-recommends -y wget libreoffice mupdf-tools && \
apt clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /go/src/app/plugnmeet-server /usr/bin/plugnmeet-server
# Run the binary.
ENTRYPOINT ["plugnmeet-server"]