The one line command you asked for might look like the following:
./ispn-cli.sh -c --controller=$(hostname -i):9990 --command="deploy --url=<url_of_the_jar>"
But for Docker I would recommend extending our image and adding your own file using COPY instruction. You may find some more hints in this blog post.
You don't need the CLI for that, use "docker cp":
docker cp /path/to/my/local.jar containerName:/opt/jboss/infinispan-server/standalone/deployments
Ahhh yes, extending the docker image is the solution I am looking for! Basically, I have this infinispan server task jar file I want to deploy, and it would be great if I can package that with the docker image, so that other users don't have to worry about doing anything extra to deploy it.
With the COPY command, do I copy the file to directory mentioned by Gustavo? Because I am using domain configuration instead of standalone, or do all jar files get copied to standalone/deployments and it gets deployed from there?