My concern is, Can I use jks file present in another machine to my machine(Docker container to be specific) by just copying it in my machine and providing the path and password for that keystore in standalone.xml?
The way I'm providing it is like below
<security-realm name="UndertowRealm">
<server-identities>
<ssl>
<keystore path="/opt/jboss/certs/wildcard.qa.ch3.s.com.jks" keystore-password="xxxx"/>
</ssl>
</server-identities>
</security-realm>
Yes, JKS is machine independent and can be transferred to different machines/servers while maintaining its integrity.
The keystores may be password protected in which case you may need to validate it before usage.
Hope that helps.