Skip to content

Commit

Permalink
enhance: hotfix docker-compose.yml (milvus-io#30378)
Browse files Browse the repository at this point in the history
Signed-off-by: Sammy Huang <[email protected]>
  • Loading branch information
yellow-shine authored Jan 30, 2024
1 parent 6d63fb5 commit fda6f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH}}"

pushd "${toplevel}"

docker build ${BUILD_ARGS} --platform linux/${IMAGE_ARCH} -f "./build/docker/milvus/${OS_NAME}/Dockerfile" -t "${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG}" .
docker build --network host ${BUILD_ARGS} --platform linux/${IMAGE_ARCH} -f "./build/docker/milvus/${OS_NAME}/Dockerfile" -t "${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG}" .

image_size=$(docker inspect ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} -f '{{.Size}}'| awk '{ byte =$1 /1024/1024/1024; print byte " GB" }')

Expand Down
3 changes: 3 additions & 0 deletions build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -euo pipefail

# hot fix for docker-compose.yml, force builder service to use host network
sed -i '/builder:/,/^\s*$/s/image: \${IMAGE_REPO}\/milvus-env:\${OS_NAME}-\${DATE_VERSION}/&\n network_mode: "host"/' docker-compose.yml

# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")

Expand Down

0 comments on commit fda6f8d

Please sign in to comment.