Pass container ID to java process as env/system variable

Well I think the issue is that I have to do “exec” because otherwise when the container is given a kill signal it doesn’t make it to my java application (which has a shutdown hook thread). This is why I had to use exec.

Any other way to get hostname into my startup command?