"Fossies" - the Fresh Open Source Software Archive

Member "solum-12.0.0/contrib/lp-cedarish/docker/fix_docker_first_boot" (30 Mar 2022, 597 Bytes) of package /linux/misc/openstack/solum-12.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 sudo docker ps 2> /dev/null > /dev/null
    4 [[ $? != 0 ]] && echo "cannot talk to docker." && exit 1
    5 
    6 [[ -f ./openrc ]] && . ./openrc
    7 [[ -f ~/devstack/openrc ]] && . ~/devstack/openrc
    8 
    9 nova list 2> /dev/null > /dev/null
   10 if [ $? != 0 ]; then
   11   echo 'cannot talk to nova. check your OpenStack credentials'
   12   exit 1
   13 fi
   14 
   15 echo 'Fixing bug where first nova boot of docker container'
   16 echo 'Starts with "sh" rather than embedded "CMD"'
   17 echo 'boot dummy instance'
   18 nova boot --flavor 1 --image docker-busybox:latest dummy
   19 echo 'sleep 60 sec'
   20 sleep 60
   21 echo 'delete dummy instance'
   22 nova delete dummy