title: Docker run with -e not working.Failed to pass spring.profiles.active in the run command
body: <p>I am facing one issue with my docker file.Image build was successful but while running I am getting an error because the active profile I am setting in the run command is not reflecting.</p>
  
  <pre><code># Get java
  FROM openjdk:8-jdk-alpine
  
  
  VOLUME /tmp
  ARG JAR
  COPY ${JAR} app.jar
  
  EXPOSE 8080
  ENV severn_js_key=1234qasw
  
  ENTRYPOINT ["java", "-jar", "app.jar"]
  </code></pre>
  
  <p>My run command is like </p>
  
  <pre><code>sudo docker run -e SPRING_PROFILES_ACTIVE=dev  -p 8088:80  -t tws-apps/service:1.0.0-SNAPSHOT
  </code></pre>
  
  <p>I am getting a null pointer exception in the server log while executing this statement </p>
  
  <pre><code>String environment = System.getProperty("spring.profiles.active");
  switch (environment) {
  </code></pre>
  
  <p>Please help</p>