Skip to content

Commit

Permalink
Updated cmd for docker version check and added podman version check
Browse files Browse the repository at this point in the history
Signed-off-by: Minghong Xu <Minghong.Xu@ibm.com>
  • Loading branch information
Minghong Xu authored and Minghong Xu committed Jun 4, 2024
1 parent 8cf4d64 commit f2d560b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 @@ -230,6 +231,7 @@ 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));
putInfo(new Info("podman", CHECK_PODMAN_CMD, ce.execute(CHECK_PODMAN_CMD), null));
}

private void getOsLabel() {
Expand Down

0 comments on commit f2d560b

Please sign in to comment.