0

I am using jib-maven-plugin to build docker image of a maven spring boot application. I want to attach an agent jar to docker entry point run command. I am using the below configuration to attach the agent jar available in project build directory.

<plugin>
          <groupId>com.google.cloud.tools</groupId>
          <artifactId>jib-maven-plugin</artifactId>
          <configuration>
            <extraDirectories>
              <paths combine.children="append">
                <path>${project.build.directory}/agent</path>
                <path>${project.build.directory}/agent-config</path>
              </paths>
            </extraDirectories>
            <container>
              <jvmFlags combine.children="append">
                <jvmFlag>-javaagent:/specialagent.jar</jvmFlag>
                <jvmFlag>-Dsa.config=/specialagent.properties</jvmFlag>
              </jvmFlags>
            </container>
          </configuration>
        </plugin>

Above configuration works if I place specialagent.jar jar file in ${project.build.directory}/agent folder. Instead I want jib-maven-plugin to download specialagent.jar jar file from the internet and place it in docker root folder. Is this possible using jib-maven-plugin?

Sreenivas
  • 63
  • 3
  • 10

0 Answers0