From: Bartek Grzybowski Date: Wed, 28 Oct 2020 13:45:53 +0000 (+0100) Subject: Run docker container in foreground X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=32f35f98c63e74bd975ee5099196aab8f6f9572c;p=oom%2Foffline-installer.git Run docker container in foreground This equals current behaviour of running in background and then attaching running container to print logs but will allow wrapper script to inherit exit code from entrypoint script. Change-Id: Ida447ef8024995de6cad81aa2dc857aec36e0d04 Issue-ID: OOM-2615 Signed-off-by: Bartek Grzybowski --- diff --git a/build/create_repo.sh b/build/create_repo.sh index ec9b239b..e70d69b2 100755 --- a/build/create_repo.sh +++ b/build/create_repo.sh @@ -155,14 +155,12 @@ then mounted_lists+=(-v ${array_list}:${container_list_volume}${array_list##*/}) done - docker run -d \ - --name $container_name \ + docker run --name $container_name \ -v ${volume_offline_directory}:${container_offline_volume} \ -v ${volume_repo_directory}:${container_repo_volume} \ "${mounted_lists[@]}" \ --rm \ --entrypoint="${container_offline_volume}docker-entrypoint.sh" \ - -it ${docker_image} \ + ${docker_image} \ "${param_array[@]}" - docker logs $(docker ps --filter name="^${container_name}$" --format '{{.ID}}' -a) -f fi