Reputation: 39
I have built the Dockerfile with base image apache karaf, but Unable to enter into Apache Karaf docker container
[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.
Upvotes: 2
Views: 781
Reputation: 2297
To access karaf shell directly you can use following command
docker exec -it b8586730289b /opt/apache/karaf/bin/client
Upvotes: 1
Reputation: 51876
As the error suggests you need export the env variable CHECK_ROOT_INSTANCE_RUNNING:
docker exec -it b8586730289b bash
export CHECK_ROOT_INSTANCE_RUNNING=false
exit
docker exec -it b8586730289b /opt/karaf/bin/karaf
Update:
If all you want is to get a shell inside container then below is all that is needed:
docker exec -it b8586730289b bash
Upvotes: 1