Exit container with error message when pseudo-TTY is unallocated (#141)

Fixes #139
Fixes #140

Signed-off-by: Wouter Born <eclipse@maindrain.net>
pull/145/head
Wouter Born 2017-12-22 01:19:34 +01:00 committed by Christian Häussler
parent 4efbb04e48
commit 75ef3afb33
44 changed files with 684 additions and 347 deletions

View File

@ -11,7 +11,7 @@ before_install:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
install:
- docker build --build-arg VCS_REF=$TRAVIS_COMMIT --build-arg BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ") --build-arg VERSION=$VERSION -t $DOCKER_REPO:$VERSION-$TARGET-$DIST $VERSION/$TARGET/$DIST
- docker run --rm $DOCKER_REPO:$VERSION-$TARGET-$DIST uname -a
- docker run --rm --tty $DOCKER_REPO:$VERSION-$TARGET-$DIST uname -a
after_success:
- docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
- docker push $DOCKER_REPO:$VERSION-$TARGET-$DIST

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/sh -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -1,4 +1,12 @@
#!/bin/bash -x
# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary
test -t 0
if [ $? -eq 1 ]; then
echo "Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose"
exit 1
fi
set -euo pipefail
IFS=$'\n\t'

View File

@ -304,7 +304,7 @@ do
for arch in $arches
do
file=$version/$arch/$base/Dockerfile
mkdir -p `dirname $file` 2>/dev/null
mkdir -p $(dirname $file) 2>/dev/null
echo -n "Writing $file..."
print_header $file;
print_baseimage $file;
@ -344,3 +344,4 @@ do
done
done
done