OpenLiberty / ci.docker

Eclipse Public License 1.0
42 stars 59 forks source link

feature.sh suppresses potential errors #423

Closed jgawor closed 8 months ago

jgawor commented 12 months ago

I have a simple Dockerfile:

FROM icr.io/appcafe/open-liberty:kernel-slim-java17-openj9-ubi
COPY --chown=1001:0 src/main/liberty/config/ /config/
COPY --chown=1001:0 resources/ /output/resources/
RUN features.sh
COPY --chown=1001:0 target/*.war /config/apps/
RUN configure.sh && rm -rf /output/resources/security/

My build started erroring with the following error during docker build:

STEP 1/6: FROM icr.io/appcafe/open-liberty:kernel-slim-java17-openj9-ubi
STEP 2/6: COPY --chown=1001:0 src/main/liberty/config/ /config/
STEP 3/6: COPY --chown=1001:0 resources/ /output/resources/
STEP 4/6: RUN features.sh
Error: building at STEP "RUN features.sh": while running runtime: exit status 21

Once I set VERBOSE=true in my Dockerfile the true error appeared:

+ featureUtility installServerFeatures --acceptLicense defaultServer --noCache

Initializing ...
<---------------------> 0.00%
Using 8 threads to download artifacts.
<---------------------> 0.00%
<==-------------------> 10.00%
<====-----------------> 15.00%
Resolving remote features. This process might take several minutes to complete.
<====-----------------> 15.00%
CWWKF1405E: The api-4.0 and api-5.0 singleton features are incompatible with each other and they cannot be installed at the same time.
CWWKF1405E: The servlet-4.0 and servlet-5.0 singleton features are incompatible with each other and they cannot be installed at the same time.
CWWKF1405E: The eeCompatible-8.0,eeCompatible-9.0, and eeCompatible-10.0 singleton features are incompatible with each other and they cannot be installed at the same time.
CWWKF1405E: The internal-4.0 and internal-5.0 singleton features are incompatible with each other and they cannot be installed at the same time.
CWWKF1405E: The transaction-1.2 and transaction-2.0 singleton features are incompatible with each other and they cannot be installed at the same time.

It would be useful to spit out the featureUtility errors to stderr by default.

kabicin commented 8 months ago

Closing this since the fix is merged and will be included with the 23.0.0.11 release. During the release it will also be backported to 23.0.0.9 and 23.0.0.6.