Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the approach to copy ear/war contents instead of using autoExpand #467

Open
leochr opened this issue Oct 11, 2023 · 1 comment
Open

Comments

@leochr
Copy link
Member

leochr commented Oct 11, 2023

Document that customers should copy the expanded ear/war at image build time instead of using autoExpand

When <applicationManager autoExpand="true" /> is set in Liberty server configuration and RUN configure.sh is called, the application will be expanded as part of the server start and stop process to generate shared class cache (SCC) to speed up startup time. This will result in the application image containing the app content twice - one as war, the other as expanded directory. This won't be a concern for applications are small in size. But it can significantly increase the image size when the application size is big.

Sample:

FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi
COPY --chown=1001:0 src/main/liberty/config /config
RUN features.sh
COPY --chown=1001:0 target/app-name/ /config/apps/app-name.war/
RUN configure.sh
@gcharters
Copy link
Member

We need to document how to do this for .ear files too. I have these steps for @NottyCode but I haven't tried them.

.... if it is an ear they should extract it to a directory with the same name, any war files in extracted ear should also be extracted into a directory with the same name as the war.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants