You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the issue:
There are a large number of empty folders in the /app/resources directory in the container. It seems that all java packages have corresponding folders in the /resources directory, regardless of whether they contain resource files.
Expected behavior:
If the java package does not contain resource files, do not create corresponding empty folders in the /app/resources directory in the container. Or provide an includeEmptyDirs configuration parameter like maven resource plugin.
Steps to reproduce:
$ git clone https://github.com/GoogleContainerTools/jib.git
$ cd jib/examples/helloworld
Delete the following lines in pom.xml
<configuration>
<to>
<image>gcr.io/REPLACE-WITH-YOUR-GCP-PROJECT/image-built-with-jib</image>
</to>
</configuration>
$ mvn compile jib:dockerBuild
$ docker run --entrypoint /bin/bash --interactive --tty helloworld:1
# ls -alh /app/resources/example/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan 1 1970 .
drwxr-xr-x 3 root root 4.0K Jan 1 1970 ..
As you can see now, every java package that does not contain resource files has an empty folder in the /app/resources directory.
There are a lot of java packages in my current project. If there are a lot of empty folders in the /app/resources directory in the container, resource file search will become slow. For example, use Spring to scan the Hibernate mapping files: classpath*:/**/*.hbm .xml.
Additional Information:
I also tried Jib Layer-Filter Extension, but it only provides glob-based file filter and cannot filter empty folders.
The text was updated successfully, but these errors were encountered:
Environment:
Description of the issue:
There are a large number of empty folders in the /app/resources directory in the container. It seems that all java packages have corresponding folders in the /resources directory, regardless of whether they contain resource files.
Expected behavior:
If the java package does not contain resource files, do not create corresponding empty folders in the /app/resources directory in the container. Or provide an includeEmptyDirs configuration parameter like maven resource plugin.
Steps to reproduce:
As you can see now, every java package that does not contain resource files has an empty folder in the /app/resources directory.
There are a lot of java packages in my current project. If there are a lot of empty folders in the /app/resources directory in the container, resource file search will become slow. For example, use Spring to scan the Hibernate mapping files: classpath*:/**/*.hbm .xml.
Additional Information:
I also tried Jib Layer-Filter Extension, but it only provides glob-based file filter and cannot filter empty folders.
The text was updated successfully, but these errors were encountered: