Fix the dependency installation for OCI docker

This commit is contained in:
Evgeniy Antonyuk 2023-06-01 18:14:41 +05:00
parent 23e45b5e57
commit e047263ea7

View File

@ -552,14 +552,14 @@ install_docker_compose () {
install_service python3 install_service python3
fi fi
if command_exists apt-get; then py3_version=$(python3 -c 'import sys; print(sys.version_info.minor)')
apt-get -y update -qq if [[ $py3_version -lt 6 ]]; then
apt-get -y -q install python3-pip curl -O https://bootstrap.pypa.io/pip/3.$py3_version/get-pip.py
elif command_exists yum; then else
curl -O https://bootstrap.pypa.io/get-pip.py curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py || true
rm get-pip.py
fi fi
python3 get-pip.py
rm get-pip.py
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
python3 -m pip install docker-compose python3 -m pip install docker-compose
@ -571,21 +571,6 @@ install_docker_compose () {
fi fi
} }
install_jq () {
if command_exists apt-get; then
apt-get -y update
apt-get -y -q install jq
elif command_exists yum; then
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm || true
yum -y install jq
fi
if ! command_exists jq; then
echo "command jq not found"
exit 1;
fi
}
check_ports () { check_ports () {
RESERVED_PORTS=(3306 8092); RESERVED_PORTS=(3306 8092);
ARRAY_PORTS=(); ARRAY_PORTS=();
@ -779,10 +764,6 @@ get_available_version () {
install_curl; install_curl;
fi fi
if ! command_exists jq ; then
install_jq
fi
CREDENTIALS=""; CREDENTIALS="";
AUTH_HEADER=""; AUTH_HEADER="";
TAGS_RESP=""; TAGS_RESP="";
@ -953,6 +934,13 @@ download_files () {
install_service svn subversion install_service svn subversion
fi fi
if ! command_exists jq ; then
if command_exists yum; then
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm
fi
install_service jq
fi
svn export --force https://github.com/${PACKAGE_SYSNAME}/${PRODUCT}/branches/${GIT_BRANCH}/build/install/docker/ ${BASE_DIR} svn export --force https://github.com/${PACKAGE_SYSNAME}/${PRODUCT}/branches/${GIT_BRANCH}/build/install/docker/ ${BASE_DIR}
reconfigure STATUS ${STATUS} reconfigure STATUS ${STATUS}
@ -965,8 +953,8 @@ download_files () {
} }
reconfigure () { reconfigure () {
local VARIABLE_NAME=$1 local VARIABLE_NAME="$1"
local VARIABLE_VALUE=$2 local VARIABLE_VALUE="$2"
if [[ -n ${VARIABLE_VALUE} ]]; then if [[ -n ${VARIABLE_VALUE} ]]; then
sed -i "s~${VARIABLE_NAME}=.*~${VARIABLE_NAME}=${VARIABLE_VALUE}~g" $BASE_DIR/.env sed -i "s~${VARIABLE_NAME}=.*~${VARIABLE_NAME}=${VARIABLE_VALUE}~g" $BASE_DIR/.env