From 58765e848313b9d030230758321d3c020120ce93 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 27 Dec 2024 12:18:13 +0300 Subject: [PATCH] add-host --- .../resources/com/rultor/agents/req/_head.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/resources/com/rultor/agents/req/_head.sh b/src/main/resources/com/rultor/agents/req/_head.sh index 7a6bacef8f..8a6f92e4b5 100644 --- a/src/main/resources/com/rultor/agents/req/_head.sh +++ b/src/main/resources/com/rultor/agents/req/_head.sh @@ -132,13 +132,21 @@ function docker_when_possible { fi ls -al . docker run -t --rm \ - -v "$(pwd):/main" "${vars[@]}" \ - --hostname=docker --privileged --net=host \ + -v "$(pwd):/main" \ + "${vars[@]}" \ + --hostname=docker \ + --privileged \ + --net=host \ --dns 8.8.8.8 \ - --memory=8g --memory-swap=16g --oom-kill-disable \ + --add-host docker:127.0.0.1 \ + --memory=8g \ + --memory-swap=16g \ + --oom-kill-disable \ "--cidfile=$(pwd)/cid" -w=/main \ -v /var/run/docker.sock:/var/run/docker.sock \ - --name="${container}" "${use_image}" /main/entry.sh + --name="${container}" \ + "${use_image}" \ + /main/entry.sh if [ -n "${directory}" ]; then docker rmi "${use_image}" fi