Reputation: 45
I try to deploy an ASP.NET Core 1.1 (Docker image) application on OpenShift online. The application generates a PDF file, but this needs write permission on a (temp) folder. I've founded on the openshift documentation that there are folders to do this things: https://developers.openshift.com/managing-your-applications/environment-variables.html#directory-variables
But I tried in my application to get the value of these environment variables but these are always empty. How can I get these in my code? I tried these code: Environment.GetEnvironmentVariable("$OPENSHIFT_TMP_DIR") Environment.GetEnvironmentVariable("OPENSHIFT_TMP_DIR")
Thx for your help!
Upvotes: 0
Views: 854
Reputation: 58563
The OPENSHIFT_TMP_DIR
environment variable is from OpenShift 2 and not in OpenShift 3. The documentation you are linking is from OpenShift 2. In OpenShift 3 you can use /tmp
if writing temporary files.
Upvotes: 3