Nitish Jaiswal
Nitish Jaiswal

Reputation: 39

Unable to enter into Apache Karaf docker container

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

Answers (2)

ImranRazaKhan
ImranRazaKhan

Reputation: 2297

To access karaf shell directly you can use following command

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

Upvotes: 1

yamenk
yamenk

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

Related Questions