title: Spring boot with docker build mvn spring-boot:build-image with jvm parametes
body: <p>I am trying build docker image for my spring boot docker using the command</p>
  <pre><code>mvn spring-boot:build-image
  </code></pre>
  <p>And below is my docker-compose.yml</p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3.3'
  services:
      spring-boot-container:
          ports:
              - '7000:7000'
          environment:
              - SPRING_PROFILES_ACTIVE=${environment}
              - JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_ENCRYPTOR_PASSWORD}
              - cloud_config_uri=${cloud_config_uri}
              - &quot;JAVA_OPTS=-Dspring.cloud.config.uri=http://localhost:8888&quot;   
          image: 'artifactory.cloud.health.com/docker-all/spring_boot_app:latest'
          restart: always
          container_name: spring_boot_app
  </code></pre>
  <p>But my spring boot app is not coming up with proper profiles and not picking java _opts.</p>
  <p>Basically in old approach i create dockerfile, then i give <code>ENTRYPOINT</code> where i pass <code>-Dspring.active.profiles</code>.</p>
  <p>But since we using <code>mvn spring-boot:build-image</code> i dont know how we pass those entrypoint variables.</p>