title: How to execute bash expression in Docker ENTRYPOINT?
body: <p>There's a Docker file for SpringBoot application with this entry point:</p>
  <pre><code># some lines omitted
  
  ENTRYPOINT java -jar app.jar --spring.config.additional-location=$(ls /config/*.properties | tr '\n' ',')
  </code></pre>
  <p>On container start a host directory is mounted to <code>/config/</code> directory:</p>
  <pre><code>docker run  -p 9999:8080  -v C:/path/to/configuration/:/config   my_image_name
  </code></pre>
  <p>And it works as expected, capturing all <code>*.properties</code> from the host directory and applying them to the app.</p>
  <p>For readability I would like to use the format with array of strings in ENTRYPOINT like this:</p>
  <pre><code>ENTRYPOINT [&quot;java&quot;, &quot;-jar&quot;, &quot;app.jar&quot;, &quot;--spring.config.additional-location=$(ls /config/*.properties | tr '\n' ',')&quot;]
  </code></pre>
  <p>Unfortunately, the expression inside <code>$(...)</code> is not evaluated at the container start and the application throws an exception that clearly shows the problem:</p>
  <pre><code>[main] ERROR org.springframework.boot.SpringApplication - Application run failed
               java.lang.IllegalStateException: Unable to load config data from '')'
  </code></pre>
  <p><strong>Please, help me to find out how to express the ENTRYPOINT arguments so the bash expression in <code>$()</code> could be evaluated as in the first case.</strong></p>