title: How can I start spring boot application in docker with profile?
body: <p>I have a simple spring-boot project:</p>
  
  <pre><code>-resources
   -application.yaml
   -application-test.yaml
  </code></pre>
  
  <p>And I have this <code>Dockerfile</code>:</p>
  
  <pre><code>FROM openjdk:8-jdk-alpine
  EXPOSE 8080
  ADD micro-boot.jar micro-boot.jar
  ENTRYPOINT ["java","-Dspring.profiles.active=test" "-jar","/micro-boot.jar"]
  </code></pre>
  
  <p>1) I build image - <code>C:\micro-boot&gt;docker build -f Dockerfile -t micro-boot .</code></p>
  
  <p>2) show all images - <code>C:\micro-boot&gt;docker image ls -a</code></p>
  
  <pre><code>micro-boot   latest  ccc9a75ebc24  4 seconds ago 112MB
  </code></pre>
  
  <p>3) try to start <code>C:\micro-boot&gt;docker image ls -a</code></p>
  
  <p>And I get an error:</p>
  
  <pre><code>/bin/sh: [java,-Dspring.profiles.active=test: not found
  </code></pre>