From 1b625a20a7d840bf86df439d8161568a04b1a3de Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw)" <3293172751nss@gmail.com> Date: Sun, 29 Oct 2023 16:59:48 +0800 Subject: [PATCH] feat: add openim helm charts Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com> --- .../openim-api/templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../openim-push/templates/deployment.yaml | 4 +- .../openim-rpc-auth/templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../openim-rpc-msg/templates/deployment.yaml | 4 +- .../templates/deployment.yaml | 4 +- .../openim-rpc-user/templates/deployment.yaml | 4 +- manifest/build-docker.sh | 37 ------------------- manifest/dockerfiles/openim-api/Dockerfile | 27 -------------- .../dockerfiles/openim-crontask/Dockerfile | 27 -------------- .../dockerfiles/openim-msggateway/Dockerfile | 27 -------------- .../dockerfiles/openim-msgtransfer/Dockerfile | 27 -------------- manifest/dockerfiles/openim-push/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-auth/Dockerfile | 27 -------------- .../openim-rpc-conversation/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-friend/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-group/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-msg/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-third/Dockerfile | 27 -------------- .../dockerfiles/openim-rpc-user/Dockerfile | 27 -------------- 24 files changed, 22 insertions(+), 383 deletions(-) delete mode 100755 manifest/build-docker.sh delete mode 100644 manifest/dockerfiles/openim-api/Dockerfile delete mode 100644 manifest/dockerfiles/openim-crontask/Dockerfile delete mode 100644 manifest/dockerfiles/openim-msggateway/Dockerfile delete mode 100644 manifest/dockerfiles/openim-msgtransfer/Dockerfile delete mode 100644 manifest/dockerfiles/openim-push/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-auth/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-conversation/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-friend/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-group/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-msg/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-third/Dockerfile delete mode 100644 manifest/dockerfiles/openim-rpc-user/Dockerfile diff --git a/deployments/charts/openim-api/templates/deployment.yaml b/deployments/charts/openim-api/templates/deployment.yaml index ff0991a8a..182d90cdc 100644 --- a/deployments/charts/openim-api/templates/deployment.yaml +++ b/deployments/charts/openim-api/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-msggateway/templates/deployment.yaml b/deployments/charts/openim-msggateway/templates/deployment.yaml index c1bcc12c9..bc2f45a33 100644 --- a/deployments/charts/openim-msggateway/templates/deployment.yaml +++ b/deployments/charts/openim-msggateway/templates/deployment.yaml @@ -51,10 +51,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-msgtransfer/templates/deployment.yaml b/deployments/charts/openim-msgtransfer/templates/deployment.yaml index 6565bf15d..b63b74dc4 100644 --- a/deployments/charts/openim-msgtransfer/templates/deployment.yaml +++ b/deployments/charts/openim-msgtransfer/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-push/templates/deployment.yaml b/deployments/charts/openim-push/templates/deployment.yaml index d408c0dcb..4a646ba0e 100644 --- a/deployments/charts/openim-push/templates/deployment.yaml +++ b/deployments/charts/openim-push/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-auth/templates/deployment.yaml b/deployments/charts/openim-rpc-auth/templates/deployment.yaml index 391e38b8f..a5df44ead 100644 --- a/deployments/charts/openim-rpc-auth/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-auth/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-conversation/templates/deployment.yaml b/deployments/charts/openim-rpc-conversation/templates/deployment.yaml index 54e14dd8e..5cc8dc2aa 100644 --- a/deployments/charts/openim-rpc-conversation/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-conversation/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-friend/templates/deployment.yaml b/deployments/charts/openim-rpc-friend/templates/deployment.yaml index d52ee02df..a99d541dd 100644 --- a/deployments/charts/openim-rpc-friend/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-friend/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-group/templates/deployment.yaml b/deployments/charts/openim-rpc-group/templates/deployment.yaml index 7f0fdaed0..872c49ccb 100644 --- a/deployments/charts/openim-rpc-group/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-group/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-msg/templates/deployment.yaml b/deployments/charts/openim-rpc-msg/templates/deployment.yaml index d647d2843..a4da7e2b4 100644 --- a/deployments/charts/openim-rpc-msg/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-msg/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-third/templates/deployment.yaml b/deployments/charts/openim-rpc-third/templates/deployment.yaml index 6537c3e7f..07bac7fcf 100644 --- a/deployments/charts/openim-rpc-third/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-third/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/deployments/charts/openim-rpc-user/templates/deployment.yaml b/deployments/charts/openim-rpc-user/templates/deployment.yaml index d01c1ce8f..4517f9b72 100644 --- a/deployments/charts/openim-rpc-user/templates/deployment.yaml +++ b/deployments/charts/openim-rpc-user/templates/deployment.yaml @@ -48,10 +48,10 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: /oepnim/openim-server/config/config.yaml + - mountPath: /config/config.yaml name: config subPath: config.yaml - - mountPath: /oepnim/openim-server/config/notification.yaml + - mountPath: /config/notification.yaml name: config subPath: notification.yaml volumes: diff --git a/manifest/build-docker.sh b/manifest/build-docker.sh deleted file mode 100755 index 7fd6dc50d..000000000 --- a/manifest/build-docker.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -IMAGEHUB="ghcr.io/openimsdk" -PROJECT=$1 -ALLPRO="all" -servers=(openim-api openim-crontask openim-msggateway openim-msgtransfer openim-push openim-rpc-auth openim-rpc-conversation openim-rpc-friend openim-rpc-group openim-rpc-msg openim-rpc-third openim-rpc-user) - - -if [ "$1" != "" ] -then - if [[ "${servers[@]}" =~ "${1}" ]] - then - echo "building ${PROJECT}" - DOCKER_PUSHIMG=${IMAGEHUB}/${PROJECT}:dev - docker rmi ${DOCKER_PUSHIMG} - docker build -f manifest/dockerfiles/${PROJECT}/Dockerfile -t ${DOCKER_PUSHIMG} . - docker push ${DOCKER_PUSHIMG} - elif [[ ! "${servers[@]}" =~ "${1}" ]] - then - if [ ${PROJECT} == ${ALLPRO} ] - then - echo "building allproject" - for element in ${servers[@]} - do - SUB_IMG=${element} - SUB_PUSHIMG=${IMAGEHUB}/${element}:dev - docker rmi ${SUB_PUSHIMG} - docker build -f manifest/dockerfiles/${SUB_IMG}/Dockerfile -t ${SUB_PUSHIMG} . - docker push ${SUB_PUSHIMG} - done - else - echo "输入的项目名称不正确" - fi - fi -else - echo "请传入一个参数" -fi \ No newline at end of file diff --git a/manifest/dockerfiles/openim-api/Dockerfile b/manifest/dockerfiles/openim-api/Dockerfile deleted file mode 100644 index c5198d2ad..000000000 --- a/manifest/dockerfiles/openim-api/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-api/openim-api cmd/openim-api/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-api/openim-api /app/bin/ -ENTRYPOINT ["/app/bin/openim-api"] diff --git a/manifest/dockerfiles/openim-crontask/Dockerfile b/manifest/dockerfiles/openim-crontask/Dockerfile deleted file mode 100644 index bba54b2e2..000000000 --- a/manifest/dockerfiles/openim-crontask/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-crontask/openim-crontask cmd/openim-crontask/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-crontask/openim-crontask /app/bin/ -ENTRYPOINT ["/app/bin/openim-crontask"] diff --git a/manifest/dockerfiles/openim-msggateway/Dockerfile b/manifest/dockerfiles/openim-msggateway/Dockerfile deleted file mode 100644 index 582178013..000000000 --- a/manifest/dockerfiles/openim-msggateway/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-msggateway/openim-msggateway cmd/openim-msggateway/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-msggateway/openim-msggateway /app/bin/ -ENTRYPOINT ["/app/bin/openim-msggateway"] diff --git a/manifest/dockerfiles/openim-msgtransfer/Dockerfile b/manifest/dockerfiles/openim-msgtransfer/Dockerfile deleted file mode 100644 index 1e08eb38a..000000000 --- a/manifest/dockerfiles/openim-msgtransfer/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-msgtransfer/openim-msgtransfer cmd/openim-msgtransfer/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-msgtransfer/openim-msgtransfer /app/bin/ -ENTRYPOINT ["/app/bin/openim-msgtransfer"] diff --git a/manifest/dockerfiles/openim-push/Dockerfile b/manifest/dockerfiles/openim-push/Dockerfile deleted file mode 100644 index c1ae3ed84..000000000 --- a/manifest/dockerfiles/openim-push/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-push/openim-push cmd/openim-push/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-push/openim-push /app/bin/ -ENTRYPOINT ["/app/bin/openim-push"] diff --git a/manifest/dockerfiles/openim-rpc-auth/Dockerfile b/manifest/dockerfiles/openim-rpc-auth/Dockerfile deleted file mode 100644 index 5124da7a1..000000000 --- a/manifest/dockerfiles/openim-rpc-auth/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-auth/openim-rpc-auth cmd/openim-rpc/openim-rpc-auth/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-auth/openim-rpc-auth /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-auth"] diff --git a/manifest/dockerfiles/openim-rpc-conversation/Dockerfile b/manifest/dockerfiles/openim-rpc-conversation/Dockerfile deleted file mode 100644 index 539d441b9..000000000 --- a/manifest/dockerfiles/openim-rpc-conversation/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-conversation/openim-rpc-conversation cmd/openim-rpc/openim-rpc-conversation/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-conversation/openim-rpc-conversation /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-conversation"] diff --git a/manifest/dockerfiles/openim-rpc-friend/Dockerfile b/manifest/dockerfiles/openim-rpc-friend/Dockerfile deleted file mode 100644 index 9927c1d30..000000000 --- a/manifest/dockerfiles/openim-rpc-friend/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-friend/openim-rpc-friend cmd/openim-rpc/openim-rpc-friend/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-friend/openim-rpc-friend /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-friend"] diff --git a/manifest/dockerfiles/openim-rpc-group/Dockerfile b/manifest/dockerfiles/openim-rpc-group/Dockerfile deleted file mode 100644 index 754151156..000000000 --- a/manifest/dockerfiles/openim-rpc-group/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-group/openim-rpc-group cmd/openim-rpc/openim-rpc-group/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-group/openim-rpc-group /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-group"] diff --git a/manifest/dockerfiles/openim-rpc-msg/Dockerfile b/manifest/dockerfiles/openim-rpc-msg/Dockerfile deleted file mode 100644 index 0f942ba8e..000000000 --- a/manifest/dockerfiles/openim-rpc-msg/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-msg/openim-rpc-msg cmd/openim-rpc/openim-rpc-msg/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-msg/openim-rpc-msg /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-msg"] diff --git a/manifest/dockerfiles/openim-rpc-third/Dockerfile b/manifest/dockerfiles/openim-rpc-third/Dockerfile deleted file mode 100644 index a1391c0c3..000000000 --- a/manifest/dockerfiles/openim-rpc-third/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-third/openim-rpc-third cmd/openim-rpc/openim-rpc-third/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-third/openim-rpc-third /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-third"] diff --git a/manifest/dockerfiles/openim-rpc-user/Dockerfile b/manifest/dockerfiles/openim-rpc-user/Dockerfile deleted file mode 100644 index b45b4aa2f..000000000 --- a/manifest/dockerfiles/openim-rpc-user/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# build container -FROM golang:1.20-alpine3.18 AS builder -ENV GOPROXY https://goproxy.cn,direct -ENV GOSUMDB=sum.golang.google.cn -ENV GO111MODULE=on - -WORKDIR /app -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add git pkgconfig build-base -ADD go.mod . -ADD go.sum . -RUN go mod download -ADD . . -RUN go build -o cmd/openim-rpc/openim-rpc-user/openim-rpc-user cmd/openim-rpc/openim-rpc-user/main.go - -# archive container -FROM alpine:3.18 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -RUN apk --no-cache add ca-certificates libdrm -RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /app/bin -COPY --from=builder /app/cmd/openim-rpc/openim-rpc-user/openim-rpc-user /app/bin/ -ENTRYPOINT ["/app/bin/openim-rpc-user"]