forked from openimsdk/open-im-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (21 loc) · 837 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
# Build Stage
FROM golang:1.20 AS builder
# Set go mod installation source and proxy
ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.io,direct
ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY
# Set up the working directory
WORKDIR /openim/openim-server
# Copy all files to the container
ADD . .
RUN make clean
RUN make build
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
WORKDIR ${SERVER_WORKDIR}
# Copy scripts and binary files to the production image
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
COPY --from=builder ${SERVER_WORKDIR}/deployments /openim/openim-server/deployments
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]