1
votes

I have a docker container from centos where I installed maven and jdk1.7 for jenkins slaves (to cut down on the build time where jenkins installs jdk and maven)

When I start a container

docker run -t -i jenkv1 /bin/bash

[root@095586d24ad9 /]# java -version

java version "1.7.0_51"

Java(TM) SE Runtime Environment (build 1.7.0_51-b13)

Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

I see java but if it gets started this way:

docker run -t -i jenkv1 /bin/sh java

"/bin/sh: java: command not found"

1

1 Answers

0
votes

try docker run -t -i jenkv1 java -version (which will not do much)