Docker custom startup script to change socket-binding-group

Hi,

I want a custom startup script to be executed when starting Keycloak in a Docker container.
The script is the following:

embed-host-controller
/socket-binding-group=standard-sockets/socket-binding=jgroups-tcp:write- 
attribute(name=interface,value=public)
stop-embedded-host-controller

It can be executed on startup but it fails with the following error message:

Executing cli script: /opt/jboss/startup-scripts/bind-public-interface.cli
{
    "outcome" => "failed",
    "failure-description" => {"domain-failure-description" => "WFLYCTL0216: Management resource '[
    (\"socket-binding-group\" => \"standard-sockets\"),
    (\"socket-binding\" => \"jgroups-tcp\")
]' not found"},
    "rolled-back" => true
}

As far as I understand this should be executed against the default standalone-ha.xml configuration file, in which the nodes already exist.
What am I missing here? :frowning:

Nevermind, I had to use “embed-server” instead of “embed-host-controller” :man_facepalming:

The following works just fine:

embed-server --server-config=standalone-ha.xml --std-out=echo
/socket-binding-group=standard-sockets/socket-binding=jgroups-tcp:write-attribute(name=interface,value=public)
stop-embedded-server