Search code examples
javadockersshcommand-line-interfacespring-shell

How can i access through ssh spring shell cli


I am trying to implement a simple cli application ( executable jar file running in linux docker image) using spring-shell library. After i started the Docker image with "docker run -it -p 8080:8080 springshelldemo" command my spring-shell app starts and the cli is available in cmd. How can i access this spring-shell cli from a second cmd using docker exec command (or some other better way) ? I need this in order to make my app available to more than 1 users at the same time.


Solution

  • I found the answer to this problem. There is this great library on top of spring shell https://github.com/fonimus/ that gives you ssh functionality and with proper docker run file command you can access the spring shell through ssh with all features present.