diff --git a/cmd/api/deploy.Dockerfile b/cmd/api/deploy.Dockerfile index fe69a6319..90363d5c6 100644 --- a/cmd/api/deploy.Dockerfile +++ b/cmd/api/deploy.Dockerfile @@ -4,8 +4,7 @@ FROM golang as build 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\ diff --git a/script/build_push_k8s_images.sh b/script/build_push_k8s_images.sh index 50c194dda..c55e83ac9 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 + mkdir ${path}/Open-IM-Server + cp -r ../* ${path}/Open-IM-Server image="${repository}/${image_names[${i}]}:$version" echo ${image} docker build -t $image . -f ${path}/deploy.Dockerfile @@ -23,6 +25,7 @@ do echo "push ${image} success" echo "==============================" i=$((i + 1)) + rm -rf ${path}/Open-IM-Server done echo "build all images success" \ No newline at end of file