dockermavenweb-applicationsjib

Jib - where to copy webapp folder inside image?


I am creating docker image using google's Jib maven plugin, image gets created successfully and backend services are working fine but my webapp folder is not part of that image. Before jib i was creating a zip containing everything (including webapp folder in the root of that zip along with executable jar) which was working fine.

Now the image created by jib has classes, libs, resources in the app root. How and where should i copy webapp folder ?


Solution

  • It worked for me by using external directories provided by maven jib plugin.

    <extraDirectories>
        <paths>
          <path>webapp</path>
          <path>
            <from>webapp</from>
            <into>/app/webapp</into>
          </path>
        </paths>
    </extraDirectories>