I have created a Dockerfile that installs java, and sets it as an environment variable $JAVA_VERSION. Everything seems to pass. At the end of the Dockerfile I execute a .sh file that references to the $JAVA_VERSION. It says it cannot find the environment variable. I then bash in to the running container, and I cannot find the installed java, nor the java environment variable.
Am I doing something wrong?