mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix: gorelease quest
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
809c2bd55c
commit
c60288d163
@ -23,6 +23,6 @@ WORKDIR ${SERVER_WORKDIR}
|
|||||||
# Copy scripts and binary files to the production image
|
# Copy scripts and binary files to the production image
|
||||||
COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
|
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}/config /openim/openim-server/config
|
||||||
COPY --from=builder ${SERVER_WORKDIR}/_output/bin/ /openim/openim-server/_output/bin/
|
COPY --from=builder ${SERVER_WORKDIR}/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||||
|
|
||||||
CMD ["sh","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"]
|
CMD ["sh","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"]
|
@ -1,30 +1,13 @@
|
|||||||
FROM golang:1.20.0 as build
|
|
||||||
|
|
||||||
WORKDIR /openim
|
|
||||||
|
|
||||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
|
||||||
echo "Asia/Shanghai" > /etc/timezone && \
|
|
||||||
mkdir -p /var/log/miniblog
|
|
||||||
|
|
||||||
COPY miniblog /openim
|
|
||||||
|
|
||||||
EXPOSE 10002
|
|
||||||
CMD ["./bin/openim-api","--port", "10002"]
|
|
||||||
|
|
||||||
|
|
||||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||||
|
|
||||||
# Set go mod installation source and proxy
|
# Set go mod installation source and proxy
|
||||||
|
|
||||||
ARG GOARCH
|
|
||||||
ARG GOOS
|
|
||||||
|
|
||||||
FROM golang:1.20 AS builder
|
FROM golang:1.20 AS builder
|
||||||
|
|
||||||
ARG GO111MODULE=on
|
ARG GO111MODULE=on
|
||||||
ARG GOPROXY=https://goproxy.cn,direct
|
ARG GOPROXY=https://goproxy.cn,direct
|
||||||
|
|
||||||
WORKDIR /openim/openim-chat
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV GO111MODULE=$GO111MODULE
|
ENV GO111MODULE=$GO111MODULE
|
||||||
ENV GOPROXY=$GOPROXY
|
ENV GOPROXY=$GOPROXY
|
||||||
@ -32,16 +15,16 @@ ENV GOPROXY=$GOPROXY
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /openim/openim-chat/bin/open_im_admin_api ./cmd/api/admin_api
|
RUN make clean
|
||||||
|
RUN make build BINS=openim-api
|
||||||
|
|
||||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
|
|
||||||
WORKDIR ${CHAT_WORKDIR}
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
COPY --from=builder ${OPENIM_CHAT_BINDIR}/open_im_admin_api /openim/openim-chat/bin/open_im_admin_api
|
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||||
COPY --from=builder ${OPENIM_CHAT_CONFIG_NAME} /openim/openim-server/config/config.yaml
|
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||||
|
|
||||||
env PORT=10002
|
EXPOSE ${10002}
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
CMD ["sh","-c","${OPENIM_SERVER_BINDIR}/platforms/${OS}/${ARCH}/openim-api","--port", "10002"]
|
||||||
CMD ["sh","-c","${OPENIM_CHAT_BINDIR}/open_im_admin_api","--port", "${PORT}","--config_folder_path","${OPENIM_CHAT_CONFIG_NAME}"]
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user