user2363318
user2363318

Reputation: 1067

docker centos:6.6 image "/bin/sh: java: command not found" java is installed

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"

Upvotes: 1

Views: 2999

Answers (1)

user2915097
user2915097

Reputation: 32196

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

Upvotes: 0

Related Questions