Detect if my app runs in Azure

I’m wondering if it is possible to detect if my Java app inside a Docker container is running in Azure. For AWS it is pretty simple, because AWS has the EC2 meta data service (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html). Has Azure something similar?

Thanks and Regards,
Sascha

  • How to run docker-compose in Azure Container Service and deploy to agent rather than master?
  • Get elastic beanstalk environment variables in docker container
  • AWS ECS leader commands (django migrate)
  • ECS will not launch instance, “unable to place a task because the resources could not be found.”
  • Kubernetes ACS engine: containers (pods) do not have internet access
  • Deploying Perl Docker Container to Elastic Beanstalk
  • How to install guard-test with docker?
  • Can't access env variables in RUN script.sh Dockerfile
  • How to git install instead of pip install?
  • Docker container on Marathon doesn't finish
  • Docker Image move to the src directory
  • Docker Tomcat7 container not always starting correctly
  • One Solution collect form web for “Detect if my app runs in Azure”

    Is this what you are looking for?

    http://dl.windowsazure.com/javadoc/com/microsoft/windowsazure/serviceruntime/RoleEnvironment.html

    Check out the isAvailable() method.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.