OpenLiberty / ci.docker

Eclipse Public License 1.0
43 stars 59 forks source link

Would you please provide sample docker file for "full" (WARNING: This is not an optimal build configuration) #450

Closed uniquejava closed 1 year ago

uniquejava commented 1 year ago

As features.sh is extremely slow, so my Dockerfile is based on the "full" version. I noticed this comment in the README

FROM public.ecr.aws/docker/library/websphere-liberty:23.0.0.8-full-java17-openj9

# This script will add the requested XML snippets to enable Liberty features and grow image to be fit-for-purpose using featureUtility.
# Only available in 'kernel-slim'. The 'full' tag already includes all features for convenience.
RUN features.sh

It says RUN features.sh is Only available in 'kernel-slim'. As I am not using 'kernel-slim', so I comment the line RUN features.sh, However, without this line, I still get this warning:

=> [11/11] RUN configure.sh 516.7s => => # WARNING: This is not an optimal build configuration. Although features in server.xml will continue to be installed corr
=> => # be added to the Dockerfile prior to configure.sh. See https://ibm.biz/wl-app-image-template for a sample application > i

Is it desirable? Should I include or remove RUN features.sh from Dockerfile for the full version base image?

image
uniquejava commented 1 year ago

I really like the build process can be as fast as possible, because each time actually only the war file changed. Can I remove configure.sh together in development environment.

leochr commented 1 year ago

@uniquejava The following comment is only applicable to Open Liberty:

# Only available in 'kernel-slim'. The 'full' tag already includes all features for convenience.

As your base image is WebSphere Liberty (not Open Liberty), please refer to the sample template for WL: https://github.com/WASdev/ci.docker#building-an-application-image

You can call features.sh with WL's 'full' image as some features are not included with WL 'full' image. The complete list of features are available here . All features listed under 'WebSphere Application Server' are included with WL 'full' image, but some features from 'System Management' and 'z/OS' are not included and can be added by running features.sh. if your application doesn't need those features then you can use the 'full'image as is.

You can also host your own Maven repository to speed up the features download/retrieval. More info is here . This will speed up the call to features.sh.

Hope that helps.

leochr commented 1 year ago

Closing. Please reopen if there is any further inquiries. Thank you