#!/bin/bash set -ex ${CATALINA_HOME}/bin/catalina.sh start # Add elasticsearch as command if needed if [ "${1:0:1}" = '-' ]; then set -- elasticsearch "$@" fi # As argument is not related to elasticsearch, # then assume that user wants to run his own process, # for example a `bash` shell to explore this image exec "$@"