feat: optimize scripts and makefiles

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-06-30 17:52:55 +08:00
parent e6bf4da430
commit a5147ca564
53 changed files with 144 additions and 114 deletions
+8 -8
View File
@@ -10,8 +10,8 @@ WORKDIR /Open-IM-Server
# add all files to the container
COPY . .
RUN chmod +x /Open-IM-Server/script/*.sh && \
/bin/sh -c /Open-IM-Server/script/build_all_service.sh
RUN chmod +x /Open-IM-Server/scripts/*.sh && \
/bin/sh -c /Open-IM-Server/scripts/build_all_service.sh
#Blank image Multi-Stage Build
FROM alpine
@@ -22,13 +22,13 @@ RUN apk add --no-cache vim curl tzdata gawk procps net-tools
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
#set directory to map logs,config file,script file.
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script","/Open-IM-Server/db/sdk"]
#set directory to map logs,config file,scripts file.
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/scripts","/Open-IM-Server/db/sdk"]
#Copy script files and binary files to the blank image
COPY --from=build --chown=root:root /Open-IM-Server/script /Open-IM-Server/script
#Copy scripts files and binary files to the blank image
COPY --from=build --chown=root:root /Open-IM-Server/scripts /Open-IM-Server/scripts
COPY --from=build --chown=root:root /Open-IM-Server/bin /Open-IM-Server/bin
WORKDIR /Open-IM-Server/script
WORKDIR /Open-IM-Server/scripts
CMD ["/Open-IM-Server/script/docker_start_all.sh"]
CMD ["/Open-IM-Server/scripts/docker_start_all.sh"]