Firstly create a container of the image
docker container create imagename
Docker creates a containerid for that image which can be retrieved using
docker ps -a
Export that container to a tar and then unzip the tar as follows:
docker export containerid | tar -xvf - -C /path/to/destination
After this, go to the destination folder. Here search for the application-name.jar file, you will find it in one of the folders. In my case it was in /home/jboss/app Then one just needs to extract the files of the jar file
jar xf application-name.jar