How to start Splunk Forwarder within a script
The arguments you are looking for are --accept-license --answer-yes --no-prompt
.
A Splunk employee publishes some Docker images on his own time that can cater for this already. Have a look at SPLUNK_START_ARGS
in the forwarders entrypoint.sh
.
Also, Docker natively supports sending its own logs to Splunk. This includes the stdout and stderr of all containers so you may not need your own forwarder.