diff --git a/Dockerfile b/Dockerfile index 4e112c0a0..4c030921e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ADD . . RUN /bin/sh -c "make clean" RUN /bin/sh -c "make build" -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 WORKDIR ${SERVER_WORKDIR} @@ -28,4 +28,4 @@ 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}/_output/bin/platforms /openim/openim-server/_output/bin/platforms -CMD ["sh","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"] \ No newline at end of file +CMD ["bash","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"] \ No newline at end of file diff --git a/build/docker/openim-api/Dockerfile b/build/docker/openim-api/Dockerfile index d29db2802..3efa2af39 100644 --- a/build/docker/openim-api/Dockerfile +++ b/build/docker/openim-api/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-api -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 WORKDIR /openim/openim-server diff --git a/build/docker/openim-cmdutils/Dockerfile b/build/docker/openim-cmdutils/Dockerfile index 4d6faad6a..8eeca87a4 100644 --- a/build/docker/openim-cmdutils/Dockerfile +++ b/build/docker/openim-cmdutils/Dockerfile @@ -21,7 +21,7 @@ RUN go mod download RUN make clean RUN make build BINS=openim-cmdutils -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 WORKDIR /openim/openim-server diff --git a/build/docker/openim-crontask/Dockerfile b/build/docker/openim-crontask/Dockerfile index 646c2899a..0257d5078 100644 --- a/build/docker/openim-crontask/Dockerfile +++ b/build/docker/openim-crontask/Dockerfile @@ -12,13 +12,15 @@ WORKDIR /openim/openim-server ENV GO111MODULE=$GO111MODULE ENV GOPROXY=$GOPROXY +COPY go.mod go.sum ./ +RUN go mod download + COPY . . -RUN go mod download RUN make clean RUN make build BINS=openim-crontask -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 WORKDIR /openim/openim-server diff --git a/build/docker/openim-msggateway/Dockerfile b/build/docker/openim-msggateway/Dockerfile index 51f1f8258..d6540921c 100644 --- a/build/docker/openim-msggateway/Dockerfile +++ b/build/docker/openim-msggateway/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-msggateway -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 WORKDIR /openim/openim-server diff --git a/build/docker/openim-msgtransfer/Dockerfile b/build/docker/openim-msgtransfer/Dockerfile index 76ecd935b..5702ce286 100644 --- a/build/docker/openim-msgtransfer/Dockerfile +++ b/build/docker/openim-msgtransfer/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-msgtransfer -FROM ghcr.io/openim-sigs/openim-bash-image:v1.2.0 +FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 ENV OS ${OS} ENV ARCH ${ARCH} diff --git a/build/docker/openim-push/Dockerfile b/build/docker/openim-push/Dockerfile index 963be33cb..ab5c7bfab 100644 --- a/build/docker/openim-push/Dockerfile +++ b/build/docker/openim-push/Dockerfile @@ -12,6 +12,9 @@ WORKDIR /openim/openim-server ENV GO111MODULE=$GO111MODULE ENV GOPROXY=$GOPROXY +COPY go.mod go.sum ./ +RUN go mod download + COPY . . RUN make clean diff --git a/build/docker/openim-rpc-auth/Dockerfile b/build/docker/openim-rpc-auth/Dockerfile index 4a09c1043..96fbc9449 100644 --- a/build/docker/openim-rpc-auth/Dockerfile +++ b/build/docker/openim-rpc-auth/Dockerfile @@ -21,7 +21,7 @@ RUN make clean # RUN make build BINS=openim-rpc -RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth ./cmd/openim-rpc/openim-rpc-auth +RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth ./cmd/openim-rpc/openim-rpc-auth FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 diff --git a/build/docker/openim-rpc-conversation/Dockerfile b/build/docker/openim-rpc-conversation/Dockerfile index deeb65505..551253ec9 100644 --- a/build/docker/openim-rpc-conversation/Dockerfile +++ b/build/docker/openim-rpc-conversation/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation ./cmd/openim-rpc/openim-rpc-conversation +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation ./cmd/openim-rpc/openim-rpc-conversation RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \ diff --git a/build/docker/openim-rpc-friend/Dockerfile b/build/docker/openim-rpc-friend/Dockerfile index 4e14e9c6e..588f51b62 100644 --- a/build/docker/openim-rpc-friend/Dockerfile +++ b/build/docker/openim-rpc-friend/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend ./cmd/openim-rpc/openim-rpc-friend +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend ./cmd/openim-rpc/openim-rpc-friend RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \ diff --git a/build/docker/openim-rpc-group/Dockerfile b/build/docker/openim-rpc-group/Dockerfile index 07b7e6edb..171a6f15f 100644 --- a/build/docker/openim-rpc-group/Dockerfile +++ b/build/docker/openim-rpc-group/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group ./cmd/openim-rpc/openim-rpc-group +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group ./cmd/openim-rpc/openim-rpc-group RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \ diff --git a/build/docker/openim-rpc-msg/Dockerfile b/build/docker/openim-rpc-msg/Dockerfile index 384aa2eaa..d27786877 100644 --- a/build/docker/openim-rpc-msg/Dockerfile +++ b/build/docker/openim-rpc-msg/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg ./cmd/openim-rpc/openim-rpc-msg +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg ./cmd/openim-rpc/openim-rpc-msg RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \ diff --git a/build/docker/openim-rpc-third/Dockerfile b/build/docker/openim-rpc-third/Dockerfile index 76dfd45ff..cbc7447ba 100644 --- a/build/docker/openim-rpc-third/Dockerfile +++ b/build/docker/openim-rpc-third/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third ./cmd/openim-rpc/openim-rpc-third +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third ./cmd/openim-rpc/openim-rpc-third RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \ diff --git a/build/docker/openim-rpc-user/Dockerfile b/build/docker/openim-rpc-user/Dockerfile index 43f73923a..97c7c31b2 100644 --- a/build/docker/openim-rpc-user/Dockerfile +++ b/build/docker/openim-rpc-user/Dockerfile @@ -20,7 +20,7 @@ COPY . . RUN make clean RUN make build BINS=openim-rpc -# RUN go build -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user ./cmd/openim-rpc/openim-rpc-user +# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user ./cmd/openim-rpc/openim-rpc-user RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \ rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \ diff --git a/docker-compose.yaml b/docker-compose.yaml index 4904e5ab1..839af1a6a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:main + image: openim-server:v1 #ghcr.io/openimsdk/openim-server:main container_name: openim-server volumes: - ./logs:/openim/openim-server/logs @@ -122,7 +122,7 @@ services: max-file: "2" openim_chat: - image: ghcr.io/openimsdk/openim-chat:main + image: openim-chat:v1 #ghcr.io/openimsdk/openim-chat:main container_name: openim_chat volumes: - ./_output/openim/openim-chat/logs:/openim/openim-chat/logs