Skip to content

Commit

Permalink
Merge pull request #565 from sophiaxu0424/podman
Browse files Browse the repository at this point in the history
Updated cmd for docker version check and added podman version check
  • Loading branch information
LongyuZhang authored Jun 10, 2024
2 parents 36267b5 + 9ef6c77 commit f4b4617
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/openj9/envInfo/MachineInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class MachineInfo {
public static final String[] CPU_CORES_CMD_SOLARIS = new String[] {"bash", "-c", "psrinfo | wc -l"};
public static final String[] NUMA_CMD = new String[] {"bash", "-c", "numactl --show | grep 'No NUMA support available on this system"};
public static final String[] SYS_VIRT_CMD = new String[] {""};
public static final String[] CHECK_DOCKER_CMD = new String[] {"bash", "-c", "if grep -sq 'docker\\|lxc' /proc/1/cgroup; then echo 'running on docker'; else echo 'not on docker'; fi"};

// Software
public static final String[] SYS_OS_CMD = new String[] {"uname", "-s"};
Expand All @@ -63,6 +62,8 @@ public class MachineInfo {
public static final String[] MAKE_VERSION_CMD = new String[] {"bash", "-c", "make --version"};
public static final String[] PERL_VERSION_CMD = new String[] {"bash", "-c", "perl --version"};
public static final String[] CURL_VERSION_CMD = new String[] {"bash", "-c", "curl --version"};
public static final String[] DOCKER_VERSION_CMD = new String[] {"bash", "-c", "docker --version"};
public static final String[] PODMAN_VERSION_CMD = new String[] {"bash", "-c", "podman --version"};


// Console
Expand Down Expand Up @@ -229,7 +230,6 @@ private void getSysInfo() {
}
putInfo(new Info("sysOS", SYS_OS_CMD, ce.execute(SYS_OS_CMD), null));
putInfo(new Info("ulimit", ULIMIT_CMD, ce.execute(ULIMIT_CMD), null));
putInfo(new Info("docker", CHECK_DOCKER_CMD, ce.execute(CHECK_DOCKER_CMD), null));
}

private void getOsLabel() {
Expand Down Expand Up @@ -260,6 +260,8 @@ private void getPrerequisiteInfo() {
putInfo(new Info("makeVersion", MAKE_VERSION_CMD, ce.execute(MAKE_VERSION_CMD), null));
putInfo(new Info("perlVersion", PERL_VERSION_CMD, ce.execute(PERL_VERSION_CMD), "5.10.1"));
putInfo(new Info("curlVersion", CURL_VERSION_CMD, ce.execute(CURL_VERSION_CMD), "7.20.0"));
putInfo(new Info("dockerVersion", DOCKER_VERSION_CMD, ce.execute(DOCKER_VERSION_CMD), null));
putInfo(new Info("podmanVersion", PODMAN_VERSION_CMD, ce.execute(PODMAN_VERSION_CMD), null));
}

private void getSpaceInfo() {
Expand Down

0 comments on commit f4b4617

Please sign in to comment.