I am building a docker image which is the "grand-daughter" of an official jboss/wildfly image.
The official jboss/wildfly Dockerfile ends with the following CMD which starts the wildfly server :
CMD [“/opt/jboss/wildfly/bin/standalone.sh”, “-b”, “0.0.0.0”]
The daughter image Dockerfile do some generic preparation stuff and has no CMD nore ENTRYPOINT. It starts with
from jboss/wildfly
My grand-daughter image will be the proper execution environment and needs to execute a script before actually launching the wildfly server. So the Docker file looks like
FROM daughter
# docker instructions
COPY entrypoint.sh /opt/
ENTRYPOINT ["/opt/entrypoint.sh"]
and my entrypoint shell is
#!/bin/bash
set -e
# truncated : do the stuff I want to do before launching wildfly
exec "$@"
My understanding was that the exec "$@"
line would have taken the initial CMD arguments from the grandparent image but it doesnt seem to be the case. My entrypoint scripts does run well but the wildfly server is not launched. Am I missing something?