Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Enabling NewRelic only on one environment

docker
dotnetcore

#1

Hi

We have a dotnetcore app running with docker for various environments. We build the same docker image and deploy to different environments. Our environment variables are in our pipeline.

I want to be able to set

    CORECLR_ENABLE_PROFILING=1

only when in a certain environment. Has any one done this before? What is the best way to do this?

Thanks


#2

Hi @jui.deshpande - If you use automation to build your environments, you would set your value for each environment based on your configuration store. If your environments are created manually, then either your environment needs to be manually configured after being built or you can have multiple templates for each type of environment.


#3

Hi @stefan_garnham

Is there no way to use if conditions in the docker file?


#4

Hi, @jui.deshpande: Adding conditions to a Dockerfile is not really a New Relic issue. You may find this post helpful: