oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.45k stars 5.4k forks source link

docker version check warning for `-ce` #2741

Open Tux opened 6 months ago

Tux commented 6 months ago
$ docker version --format '{{.Server.Version }}'
24.0.5-ce

=>

buildContainerImage.sh: line 97: [: 2405-ce: integer expression expected
diff --git a/OracleDatabase/SingleInstance/dockerfiles/buildContainerImage.sh b/OracleDatabase/SingleInstance/dockerfiles/buildContainerImage.sh
index 0239f698..c757047a 100755
--- a/OracleDatabase/SingleInstance/dockerfiles/buildContainerImage.sh
+++ b/OracleDatabase/SingleInstance/dockerfiles/buildContainerImage.sh
@@ -90,10 +90,11 @@ checkPodmanVersion() {
 checkDockerVersion() {
   # Get Docker Server version
   echo "Checking Docker version."
-  DOCKER_VERSION=$("${CONTAINER_RUNTIME}" version --format '{{.Server.Version }}'|| exit 0)
+  DOCKER_VERSION=$("${CONTAINER_RUNTIME}" version --format '{{.Server.Version }}' | sed 's/-ce$//' || exit 0)
   # Remove dot in Docker version
   DOCKER_VERSION=${DOCKER_VERSION//./}

+  echo "${DOCKER_VERSION}" "${MIN_DOCKER_VERSION//./}"
   if [ "${DOCKER_VERSION}" -lt "${MIN_DOCKER_VERSION//./}" ]; then
     echo "Docker version is below the minimum required version ${MIN_DOCKER_VERSION}"
     echo "Please upgrade your Docker installation to proceed."
aditya059 commented 5 months ago

Hi @Tux Please provide more info on how you installed this docker version. I tried installing the same version and ran docker version. I am not getting -ce.

$ sudo docker version --format '{{.Server.Version }}' 24.0.5

Also, no one else has filed this issue. It seems to be specific to your installation.

Tux commented 5 months ago
🐧 ux
pc09  Linux 5.14.21-150400.24.97-default [openSUSE Leap 15.4]  HP Z4G4 Xeon(R) W-2245 CPU @ 3.90GHz/3900(16 cores) x86_64  31810 Mb
🐧 which docker
/usr/bin/docker
🐧 rpm -qf /usr/bin/docker
docker-24.0.7_ce-150000.190.4.x86_64
🐧 zypper se -si docker-24.0.7_ce-150000.190.4.x86_64
Loading repository data...
Reading installed packages...

S  | Name   | Type    | Version                | Arch   | Repository
---+--------+---------+------------------------+--------+-------------------------------------------------------------
i+ | docker | package | 24.0.7_ce-150000.190.4 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
🐧 cat /etc/zypp/repos.d/repo-sle-update.repo
[repo-sle-update]
name=Update repository with updates from SUSE Linux Enterprise 15
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/update/leap/$releasever/sle/
path=/
type=rpm-md
keeppackages=0
🐧 sudo zypper in docker