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

Docker build for system service fails on features.sh #92

Closed
stefandecimelli opened this issue Oct 13, 2023 · 4 comments
Closed

Docker build for system service fails on features.sh #92

stefandecimelli opened this issue Oct 13, 2023 · 4 comments

Comments

@stefandecimelli
Copy link

stefandecimelli commented Oct 13, 2023

Issue encountered when running in the start folder.

To reproduce:

sudo docker build -t system:1.0-java11-SNAPSHOT --build-arg JAVA_VERSION=java11 system/.
failure also present on
sudo docker build -t system:1.0-java17-SNAPSHOT --build-arg JAVA_VERSION=java17 system/.

This is not seen when building the graphql container with docker build -t graphql:1.0-SNAPSHOT graphql/.

Error

[+] Building 0.9s (7/9)                                                                                                                                                               docker:default
 => [internal] load .dockerignore                                                                                                                                                               0.0s
 => => transferring context: 2B                                                                                                                                                                 0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                            0.0s
 => => transferring dockerfile: 945B                                                                                                                                                            0.0s
 => [internal] load metadata for icr.io/appcafe/open-liberty:full-java11-openj9-ubi                                                                                                             0.4s
 => [1/5] FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi@sha256:ff7b5426d415be4a66f73f035901ec62f9750bb2d99eedfa8c08509c125333a7                                                       0.0s
 => [internal] load build context                                                                                                                                                               0.0s
 => => transferring context: 1.37MB                                                                                                                                                             0.0s
 => CACHED [2/5] COPY --chown=1001:0 src/main/liberty/config /config/                                                                                                                           0.0s
 => ERROR [3/5] RUN features.sh                                                                                                                                                                 0.4s
------
 > [3/5] RUN features.sh:
0.337 /bin/sh: features.sh: command not found
------
Dockerfile:20
--------------------
  18 |     
  19 |     COPY --chown=1001:0 src/main/liberty/config /config/
  20 | >>> RUN features.sh
  21 |     COPY --chown=1001:0 target/guide-microprofile-graphql-system.war /config/apps
  22 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c features.sh" did not complete successfully: exit code: 127
@stefandecimelli
Copy link
Author

stefandecimelli commented Oct 13, 2023

Temporary solution seems to be to edit system/Dockerfile to use the docker base kernel-slim- rather than full-

ARG JAVA_VERSION=java11
ARG VERSION=1.0
ARG REVISION=SNAPSHOT
FROM icr.io/appcafe/open-liberty:full-${JAVA_VERSION}-openj9-ubi
...

to

ARG JAVA_VERSION=java11
ARG VERSION=1.0
ARG REVISION=SNAPSHOT
FROM icr.io/appcafe/open-liberty:kernel-slim-${JAVA_VERSION}-openj9-ubi
...

@gkwan-ibm
Copy link
Member

hi @decimelli

Thank you to report this issue. It is because the full image does not need to call features.sh to install Liberty features, that why it does not provide features.sh. If you include it in the Dockerfile, it will have the error as you reported.

Yes, the system service in this guide should either remove the features.sh or change to use kernel image. We will fix it.

@gkwan-ibm
Copy link
Member

the issue relates to OpenLiberty/ci.docker#469

@gkwan-ibm
Copy link
Member

gkwan-ibm commented Oct 17, 2023

close

  • the issue was fixed that the system Dockerfile uses the kernel-slim image now

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

3 participants