Giter Site home page Giter Site logo

Comments (5)

ryanemerson avatar ryanemerson commented on June 18, 2024 1

There will need to be some input to the image as currently the launch script generates credentials/xml etc, so there will have to be some mechanism to prevent this when config files are provided by the user.

One very simple option is that we just say that users have to also mount there own /opt/infinispan/bin/launch.sh. Something as simple as:

#!/bin/sh
exec ${ISPN_HOME}/bin/server.sh -c <mounted-config-location>

from infinispan-images.

rigazilla avatar rigazilla commented on June 18, 2024

There will still be and additional setup phase on the image side?
It would be interesting to have an Infinispan "naked" image with everything (xml, secrets, maps) mounted from the user or the operator and just a bin/server.sh entry point....
don't know if it's actually possible

from infinispan-images.

gustavocoding avatar gustavocoding commented on June 18, 2024

The previous image would accept the custom file as an argument:
https://github.com/jboss-dockerfiles/infinispan/tree/9.4.x/server#starting-with-a-custom-configuration

This would avoid the user having to override the full launch script which may contain other logic that affects other startup options of the server.

Also I am not sure if it's doable to mount just a single file of a folder, in order just to override a single file in the /bin without affecting others. This will force the user to override the container entry point as well, which starts to get too much work on their side

from infinispan-images.

gustavocoding avatar gustavocoding commented on June 18, 2024

For example: one thing I found out is that the config file is manipulated with the config-generator so that it has

<inet-address value='172.17.0.2'/>

But when using the entrypoint as simply server.sh, it will cause the container to be inaccessible since it defaults to

<inet-address value="${infinispan.bind.address:127.0.0.1}"/>

from infinispan-images.

ryanemerson avatar ryanemerson commented on June 18, 2024

Adding summary of zulip conversation for completeness.

The issue with the bind address can be overcome by adding the -b SITE_LOCAL to the server.sh command.

So it's possible to overwrite the launch.sh file with the following:

#!/bin/sh
exec ${ISPN_HOME}/bin/server.sh -b SITE_LOCAL -c <mounted-config-location>

Or directly with a docker command via:

docker volume create example-vol
cp custom-infinispan.xml custom-jgroups.xml /var/lib/docker/volumes/example-vol/_data
docker run -it -v example-vol:/user-config --entrypoint "/opt/infinispan/bin/server.sh"  infinispan/server -b SITE_LOCAL -c /user-config/custom-infinispan.xml

from infinispan-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.