ensure binfmt-support is installed
This commit is contained in:
parent
f8f3d6fe93
commit
bf656ca53c
|
@ -3,11 +3,23 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
BUILD_OPTS="$*"
|
BUILD_OPTS="$*"
|
||||||
|
|
||||||
DOCKER="docker"
|
SUDO=''
|
||||||
|
if [ $EUID != 0 ]; then
|
||||||
if ! ${DOCKER} ps >/dev/null 2>&1; then
|
SUDO='sudo'
|
||||||
DOCKER="sudo docker"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function install_binfmt_support {
|
||||||
|
local binfmtSupport="binfmt-support"
|
||||||
|
if ! dpkg -s $binfmtSupport &>/dev/null; then
|
||||||
|
echo "please install $binfmtSupport with this command: $SUDO apt-get install $binfmtSupport"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_binfmt_support
|
||||||
|
|
||||||
|
DOCKER="$SUDO docker"
|
||||||
|
|
||||||
if ! ${DOCKER} ps >/dev/null; then
|
if ! ${DOCKER} ps >/dev/null; then
|
||||||
echo "error connecting to docker:"
|
echo "error connecting to docker:"
|
||||||
${DOCKER} ps
|
${DOCKER} ps
|
||||||
|
|
Loading…
Reference in New Issue
Block a user