Check that docker-container runs successfully.

Break execution with error message in case if
the docker fails to start new container.

Change-Id: I2880a0a569dc3a56a73c0f9deea018f5b626ae10
Closes-bug: #1485758
(cherry picked from commit fe81731b76)
This commit is contained in:
Bulat Gaifullin 2015-10-14 16:00:44 +03:00 committed by Bulat Gaifullin
parent 375a5bfc93
commit 9c00e595b4
1 changed files with 3 additions and 1 deletions

View File

@ -482,7 +482,9 @@ if [[ "$DOCKER_MODE" = "true" ]]; then
-e UBUNTU_INSTALLER_KERNEL_VERSION=$UBUNTU_INSTALLER_KERNEL_VERSION -e UBUNTU_KERNEL_FLAVOR=$UBUNTU_KERNEL_FLAVOR \
-e RSYNC_PROXY=$RSYNC_PROXY -e FUEL_VERSION=$FUEL_VERSION -e http_proxy=$http_proxy \
-e UBUNTU_ARCH=$UBUNTU_ARCH -e BINROOT=$BINROOT \
-e apt_altstate=$apt_altstate -v $BINROOT:$BINROOT:rw -v $apt_altstate:$apt_altstate:rw ubuntu:latest
-e apt_altstate=$apt_altstate -v $BINROOT:$BINROOT:rw -v $apt_altstate:$apt_altstate:rw ubuntu:latest \
|| fatal "Cannot run the docker container, please check connectivity to index.docker.io"
dockerctl shell fuel-createmirror $BINROOT/util/partial_ubuntu.sh || fatal "Cannot calculate list of dependencies"
# cleanup ubuntu container
docker rm -f fuel-createmirror