我启动并附加了一个docker容器,但在设置JDK之后没有任何工作。
命令后,Docker容器无效。
ken@namenode:~$ docker start peaceful_babbage
peaceful_babbage
ken@namenode:~$ docker attach peaceful_babbage
root@1477050f192a:/#
root@1477050f192a:/# java -version
bash: java: command not found
root@1477050f192a:/# source /etc/profile
root@1477050f192a:/# echo $PATH
/usr/lib/jdk1.7.0_60/bin:/usr/lib/jdk1.7.0_60/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@1477050f192a:/# java -version
java version "1.7.0_60"
Java™ SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot™ 64-Bit Server VM (build 24.60-b09, mixed mode)
root@1477050f192a:/#
root@1477050f192a:/# java
Usage: java [-options] class [args…]
(to execute a class)
or java [-options] -jar jarfile [args…]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the “server” VM
The default VM is server.
...
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
^C
此时,我对这个容器无能为力。也无法杀死Java进程。谁可以帮我这个?
答案 0 :(得分:0)
您可以直接从主机停止容器:
docker stop peaceful_babbage