mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix: docker images optimize
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
f9f604b4b9
commit
59e3eeb0a3
@ -19,7 +19,7 @@ ADD . .
|
|||||||
RUN /bin/sh -c "make clean"
|
RUN /bin/sh -c "make clean"
|
||||||
RUN /bin/sh -c "make build"
|
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}
|
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}/config /openim/openim-server/config
|
||||||
COPY --from=builder ${SERVER_WORKDIR}/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
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 ["bash","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"]
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
RUN make build BINS=openim-api
|
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
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ RUN go mod download
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
RUN make build BINS=openim-cmdutils
|
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
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
|
@ -12,13 +12,15 @@ WORKDIR /openim/openim-server
|
|||||||
ENV GO111MODULE=$GO111MODULE
|
ENV GO111MODULE=$GO111MODULE
|
||||||
ENV GOPROXY=$GOPROXY
|
ENV GOPROXY=$GOPROXY
|
||||||
|
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go mod download
|
|
||||||
RUN make clean
|
RUN make clean
|
||||||
RUN make build BINS=openim-crontask
|
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
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
RUN make build BINS=openim-msggateway
|
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
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
RUN make build BINS=openim-msgtransfer
|
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 OS ${OS}
|
||||||
ENV ARCH ${ARCH}
|
ENV ARCH ${ARCH}
|
||||||
|
@ -12,6 +12,9 @@ WORKDIR /openim/openim-server
|
|||||||
ENV GO111MODULE=$GO111MODULE
|
ENV GO111MODULE=$GO111MODULE
|
||||||
ENV GOPROXY=$GOPROXY
|
ENV GOPROXY=$GOPROXY
|
||||||
|
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make clean
|
RUN make clean
|
||||||
|
@ -21,7 +21,7 @@ RUN make clean
|
|||||||
|
|
||||||
# RUN make build BINS=openim-rpc
|
# 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
|
FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||||
|
@ -20,7 +20,7 @@ COPY . .
|
|||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
RUN make build BINS=openim-rpc
|
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 && \
|
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 && \
|
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||||
|
@ -100,7 +100,7 @@ services:
|
|||||||
|
|
||||||
|
|
||||||
openim_server:
|
openim_server:
|
||||||
image: ghcr.io/openimsdk/openim-server:main
|
image: openim-server:v1 #ghcr.io/openimsdk/openim-server:main
|
||||||
container_name: openim-server
|
container_name: openim-server
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/openim/openim-server/logs
|
- ./logs:/openim/openim-server/logs
|
||||||
@ -122,7 +122,7 @@ services:
|
|||||||
max-file: "2"
|
max-file: "2"
|
||||||
|
|
||||||
openim_chat:
|
openim_chat:
|
||||||
image: ghcr.io/openimsdk/openim-chat:main
|
image: openim-chat:v1 #ghcr.io/openimsdk/openim-chat:main
|
||||||
container_name: openim_chat
|
container_name: openim_chat
|
||||||
volumes:
|
volumes:
|
||||||
- ./_output/openim/openim-chat/logs:/openim/openim-chat/logs
|
- ./_output/openim/openim-chat/logs:/openim/openim-chat/logs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user