From 685511981ade557c519663fe8ab455c3500d9de7 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 16 Jun 2023 12:14:30 +0800 Subject: [PATCH] update sh --- cmd/api/deploy.Dockerfile | 4 ++-- script/build_push_k8s_images.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/api/deploy.Dockerfile b/cmd/api/deploy.Dockerfile index 596832484..fe69a6319 100644 --- a/cmd/api/deploy.Dockerfile +++ b/cmd/api/deploy.Dockerfile @@ -5,7 +5,7 @@ ENV GO111MODULE=on ENV GOPROXY=https://goproxy.cn,direct RUN mkdir -p /Open-IM-Server -COPY . /Open-IM-Server +COPY ../. /Open-IM-Server WORKDIR /Open-IM-Server/cmd/api RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\ @@ -17,7 +17,7 @@ RUN apt-get install -y vim curl tzdata gawk RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata RUN apt-get -qq update \ && apt-get -qq install -y --no-install-recommends ca-certificates curl - +RUN echo pwd RUN make build VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"] diff --git a/script/build_push_k8s_images.sh b/script/build_push_k8s_images.sh index 50c194dda..c6b08ea2d 100644 --- a/script/build_push_k8s_images.sh +++ b/script/build_push_k8s_images.sh @@ -15,6 +15,8 @@ currentPwd=${pwd} i=0 for path in ${service_source_root[*]} do + cd ${path} + make build image="${repository}/${image_names[${i}]}:$version" echo ${image} docker build -t $image . -f ${path}/deploy.Dockerfile @@ -23,6 +25,8 @@ do echo "push ${image} success" echo "==============================" i=$((i + 1)) + rm -rf ${service_names[${i}]} + cd ${currentPwd} done echo "build all images success" \ No newline at end of file