我已经使用基础镜像 apache karaf 构建了 Dockerfile,但无法进入 Apache Karaf docker 容器
[root@HNHC9F2 docker_file]# docker exec -it b8586730289b /opt/karaf/bin/karaf
karaf: There is a Root instance already running with name root and pid 132. If you know what you are doing and want to force the run anyway, export CHECK_ROOT_INSTANCE_RUNNING=false and re run the command.
最佳答案
正如错误所示,您需要导出环境变量CHECK_ROOT_INSTANCE_RUNNING:
docker exec -it b8586730289b bash
export CHECK_ROOT_INSTANCE_RUNNING=false
exit
docker exec -it b8586730289b /opt/karaf/bin/karaf
更新:
如果您想要的只是在容器内获得一个外壳,那么下面就是所需要的:
docker exec -it b8586730289b bash
关于docker - 无法进入 Apache Karaf docker 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47514933/