Axonserver-cli.jar not found when run via Docker

Hi everyone!

I’m running AxonServer in Docker. I got 2 questions now:

  1. In previous versions, I could simply docker exec <name> bash into the container and “debug stuff”. Now neither bash nor sh seems to be available?

  2. I want to register a user on the server. In previous versions I just did docker exec ... java -jar axonserver-cli.jar register-user ... but now I get Error: Unable to access jarfile axonserver-cli.jar. Where is this file? How can I register a user now?

Greetings, Martin

1 Like

Hi Martin,

both have to do with a change in how Axon Server docker images are now build. Recent images are built with Jib which builds much smaller “Distroless” images. Such images do not have a shell. The change was introduced in 4.3 image which was released almost a year ago so it’s not really a very new thing.

So what are your options:

  1. Well you can’t bash or sh into it the way it is. It may be possible to create custom image that has a shell but I’m not sure that’s worth the effort. It will be very interesting to know what is behind “debug stuff”. Perhaps there are some things that should be somehow exposed and/or improved based on your feedback.

  2. The axonserver-cli.jar is no longer distributed in the docker image so you can’t do that anymore. But the Axon Server ZIP contains it. It can be downloaded from https://axoniq.io/download

Hi Milen,

  1. Ah got it. Yeah, we didn’t need to use the CLI tool for over a year :wink:

  2. Ah got it. We just download the JAR locally and have it connect to our server :bulb:

Thanks for the insights.