Optimizing Docker Log Output Detection

pull/2018/head
skiffer-git 2 years ago
parent 1b1721e129
commit 04bddeb3b3

@ -26,12 +26,8 @@
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/install/common.sh" source "${OPENIM_ROOT}/scripts/install/common.sh"
if openim::util::is_running_in_container; then if is_running_in_container; then
echo "container!!!!11111111111"
exec > ${DOCKER_LOG_FILE} 2>&1 exec > ${DOCKER_LOG_FILE} 2>&1
else
echo "host!!!!11111111111"
fi fi
@ -79,7 +75,7 @@ if grep -qE 'docker|kubepods' /proc/1/cgroup || [ -f /.dockerenv ]; then
openim::color::echo ${COLOR_CYAN} "Environment in the interior of the container" openim::color::echo ${COLOR_CYAN} "Environment in the interior of the container"
else else
openim::color::echo ${COLOR_CYAN} "The environment is outside the container" openim::color::echo ${COLOR_CYAN} "The environment is outside the container"
openim::util::check_ports ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]} || return 0 openim::util::check_ports ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}
fi fi
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then

@ -62,12 +62,8 @@ function execute_start_scripts() {
if openim::util::is_running_in_container; then if is_running_in_container; then
echo "container!!!!11111111111"
exec > ${DOCKER_LOG_FILE} 2>&1 exec > ${DOCKER_LOG_FILE} 2>&1
else
echo "host!!!!11111111111"
fi fi

Loading…
Cancel
Save