feat: set github hub

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-08-02 12:35:45 +08:00
parent cce47bddd7
commit 88f6f51eff
7 changed files with 98 additions and 80 deletions
+1 -12
View File
@@ -1,10 +1,6 @@
# Build Stage
FROM golang:1.20 AS builder
LABEL org.opencontainers.image.source=https://github.com/OpenIMSDK/Open-IM-Server
LABEL org.opencontainers.image.description="OpenIM Server image"
LABEL org.opencontainers.image.licenses="Apache 2.0"
# Set go mod installation source and proxy
ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct
@@ -19,14 +15,7 @@ ADD . .
RUN /bin/sh -c "make build"
# Production Stage
FROM alpine
RUN echo "https://mirrors.aliyun.com/alpine/v3.4/main" > /etc/apk/repositories && \
apk --no-cache add tzdata ca-certificates bash
# Set directory to map logs, config files, scripts, and SDK
VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"]
FROM ghcr.io/openim-sigs/openim-bash-image:latest
# Copy scripts and binary files to the production image
COPY --from=builder /Open-IM-Server/scripts /Open-IM-Server/scripts