Is it possible to make a karaf installation run a set of console
commands?
What I would like to do, is to try to create a dockerfile setting up a
docker image for my webapp:
https://github.com/steinarb/ukelonn
And the steps listed in 6. and 8. below are run from the karaf console.
Is it po
Hi Steinar,
May be you can run Karaf console commands using the ssh client in the
docker compose ? (I did not try this before and I'm interesting to know
if it work's ;)
François
Le 02/03/2018 à 01:10, Steinar Bang a écrit :
> Is it possible to make a karaf installation run a set of console
> c
Hi,
you can change in etc/shell.init.script.
Here you can define a set of commands executed at startup. You can also create a
script wrapping all your commands.
Regards
JB
On 03/01/2018 10:10 PM, Steinar Bang wrote:
> Is it possible to make a karaf installation run a set of console
> commands?
> Francois Papon :
> May be you can run Karaf console commands using the ssh client in the
> docker compose ? (I did not try this before and I'm interesting to know
> if it work's ;)
With the help off sshpass, this works for simple one-liners, like
"feature:install ukelonn".
First install ss
Ok, thanks for your feeback ;)
François
Le 02/03/2018 à 20:57, Steinar Bang a écrit :
>> Francois Papon :
>> May be you can run Karaf console commands using the ssh client in the
>> docker compose ? (I did not try this before and I'm interesting to know
>> if it work's ;)
> With the help off
you can use docker exec or compose exec to run multiple commands from file.
create configure.cmd file with commands e.g.
config:edit com.example.config
config:property-set example.property value
config:update
then run:
docker-compose exec -T container /opt/karaf/bin/client -b < configure.cmd
m.
I managed the problem starting karaf in the background and installing features
via client after startup. Therefore you need to wait until karaf starts and
installed default packages.
You can see a sample here
https://github.com/mhus/cherry-reactive/tree/master/reactive-docker/reactive-playgroun
By the way to know when Karaf is fully started you have the Bootstrap service.
It's what we use for the startup progress bar (like in ServiceMix).
Regards
JB
Le 23 avr. 2018 à 11:17, à 11:17, Mike Hummel a écrit:
>I managed the problem starting karaf in the background and installing
>features v
> Jean-Baptiste Onofré :
> Hi,
> you can change in etc/shell.init.script.
> Here you can define a set of commands executed at startup. You can also
> create a
> script wrapping all your commands.
Tried this approach and I had some success. The "success" is in that I
managed to end up with