I’m having a similar issue although I’m just trying to use existing environment variables. I don’t want to set environment variables.
I’m using CMD to run a shell script which uses ORACLE_HOME environment variable. When Docker runs the script ORACLE_HOME has no value. If I start the container with the bash shell (docker run -i -t … /bin/bash) the script works perfectly. ORACLE_HOME environment variable points to the Oracle installation.
I could use ENV in the dockerfile to point to the oracle installation but then that defeats the whole purpose of Oracle using Linux environment variables. If the oracle installation changes I would have to change the docker file when in reality I shouldn’t have to.
Can anyone shed some light on this issue?