2
votes

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.

2

2 Answers

1
votes

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
0
votes

To access karaf shell directly you can use following command

docker exec -it b8586730289b /opt/apache/karaf/bin/client