diff --git a/cmd/api/deploy.Dockerfile b/cmd/api/deploy.Dockerfile index 90363d5c6..97093c830 100644 --- a/cmd/api/deploy.Dockerfile +++ b/cmd/api/deploy.Dockerfile @@ -17,7 +17,7 @@ RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure RUN apt-get -qq update \ && apt-get -qq install -y --no-install-recommends ca-certificates curl RUN echo pwd -RUN make build +COPY ./open_im_api ./ 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 c55e83ac9..7deaf476f 100644 --- a/script/build_push_k8s_images.sh +++ b/script/build_push_k8s_images.sh @@ -15,8 +15,8 @@ currentPwd=${pwd} i=0 for path in ${service_source_root[*]} do - mkdir ${path}/Open-IM-Server - cp -r ../* ${path}/Open-IM-Server + cd ${path} + make build image="${repository}/${image_names[${i}]}:$version" echo ${image} docker build -t $image . -f ${path}/deploy.Dockerfile @@ -25,7 +25,7 @@ do echo "push ${image} success" echo "==============================" i=$((i + 1)) - rm -rf ${path}/Open-IM-Server + cd ${currentPwd} done echo "build all images success" \ No newline at end of file