OpenLiberty / OpenLiberty/ci.docker

Slow execution of features.sh, during docker build

Open
#231 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
48
Forks
60
Avg merge
3h 2m
Merged PRs (30d)
3

Description

In doing a docker build (from Win10) with

FROM openliberty/open-liberty:20.0.0.12-kernel-slim-java11-openj9-ubi
...
RUN features.sh

and server.xml feature set

   <featureManager>
        <feature>cdi-2.0 </feature>
        <feature>jaxrs-2.1</feature>
        <feature>mpMetrics-2.3</feature>
        <feature>mpHealth-2.2</feature>
        <feature>mpConfig-1.4</feature>
    </featureManager>

it takes 5 min. to execute the features.sh step, on a fairly slow internet connection.

COMPARISONS

  1. If I take the same project outside of the docker build and do a native/host execution of the command run in features.sh:

time featureUtility installServerFeatures --acceptLicense defaultServer --noCache

it takes about the same time. So there isn't a container penalty per se.

  1. However, if I turn on caching, and run the following command:

time featureUtility installServerFeatures --acceptLicense defaultServer

then run it again with the cache populated, it goes down to 45 sec.

QUESTION

Could we consider building the cached features into the mvn repo of the kernel-slim image? Yes it would make this image bigger but would still achieve the goal of keeping the application images we build smaller. UPDATE: That idea doesn't make sense, deleting it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with features.sh and the featureUtility installServerFeatures command described in the issue, then reproduce the Docker build with caching disabled and enabled. Compare the timings and review the issue discussion for an agreed direction; the issue currently does not define a concrete change or a clear completion condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.