I have a .jar that contains multiple public static void main(psvm)'s that I want to be able to call when I do docker run ... -e <class.path.from.env> on the image and pass an environment variable to specify the class path. Something like this:
  <plugin>
    <groupId>io.fabric8</groupId>
    <artifactId>docker-maven-plugin</artifactId>
    <configuration>
      <images>
        <image>
          <name>${project.artifactId}</name>
          <build>
            <from>java:8-jre</from>
            <tags>
              <tag>${build.environment}-latest</tag>
              <tag>${build.environment}-${build.number}</tag>
            </tags>
            <entryPoint>
              <exec>
                <arg>java</arg>
                <arg>-Duser.timezone=UTC</arg>
                <arg>-cp</arg>
                <arg>/opt/${project.artifactId}-${project.version}.jar</arg>
                <arg>${class.path.from.env}</arg>
              </exec>
            </entryPoint>
            <assembly>
              <basedir>/opt</basedir>
              <inline>
                <files>
                  <file>
                    <source>target/${project.artifactId}-${project.version}.jar</source>
                  </file>
                </files>
              </inline>
            </assembly>
          </build>
        </image>
      </images>
    </configuration>
  </plugin>
Although I read the whole documentation for docker-maven-plugin, I'm not sure how I can make this work. Basically where do I declare the environment variable class.path.from.env and how can I make sure it gets the one I pass through -e in docker run ...?