File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
OracleDatabase/SingleInstance/dockerfiles Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,10 @@ checkPodmanVersion() {
7474 echo " Checking Podman version."
7575 PODMAN_VERSION=$( " ${CONTAINER_RUNTIME} " info --format ' {{.host.BuildahVersion}}' 2> /dev/null ||
7676 " ${CONTAINER_RUNTIME} " info --format ' {{.Host.BuildahVersion}}' )
77- # Remove dot in Podman version
78- PODMAN_VERSION=${PODMAN_VERSION// ./ }
7977
80- if [ -z " ${PODMAN_VERSION} " ]; then
78+ if [ -z " ${PODMAN_VERSION// . / } " ]; then
8179 exit 1;
82- elif [ " ${ PODMAN_VERSION} " -lt " ${ MIN_PODMAN_VERSION// . / } " ]; then
80+ elif [ " $( printf ' %s\n ' " $MIN_PODMAN_VERSION " " $ PODMAN_VERSION" | sort -V | head -n1 ) " != " $ MIN_PODMAN_VERSION" ]; then
8381 echo " Podman version is below the minimum required version ${MIN_PODMAN_VERSION} "
8482 echo " Please upgrade your Podman installation to proceed."
8583 exit 1;
@@ -91,10 +89,8 @@ checkDockerVersion() {
9189 # Get Docker Server version
9290 echo " Checking Docker version."
9391 DOCKER_VERSION=$( " ${CONTAINER_RUNTIME} " version --format ' {{.Server.Version }}' || exit 0)
94- # Remove dot in Docker version
95- DOCKER_VERSION=${DOCKER_VERSION// ./ }
9692
97- if [ " ${ DOCKER_VERSION} " -lt " ${ MIN_DOCKER_VERSION// . / } " ]; then
93+ if [ " $( printf ' %s\n ' " $MIN_DOCKER_VERSION " " $ DOCKER_VERSION" | sort -V | head -n1 ) " != " $ MIN_DOCKER_VERSION" ]; then
9894 echo " Docker version is below the minimum required version ${MIN_DOCKER_VERSION} "
9995 echo " Please upgrade your Docker installation to proceed."
10096 exit 1;
You can’t perform that action at this time.
0 commit comments