docker-splunk
docker-splunk copied to clipboard
Run ansible configuration during docker build process
Currently, ansible configuration is run in the Docker run phase. This has a couple of disadvantages:
- Startup time, see https://github.com/splunk/docker-splunk/issues/10
- Existing
etc
files need to be converted to YAML files, see Create Custom Configs - Uncommon for Docker - build phase is usually used for configuration
My expectation would be that I could do the ansible configuration first during build time and then just run the splunk
process with Docker run, e.g. like this:
FROM splunk/splunk:8.2.4
ENV SPLUNK_START_ARGS --accept-license
ENV SPLUNK_PASSWORD splunkdev
# Configure using ansible
USER ansible
COPY ./tmp /tmp
RUN /sbin/entrypoint.sh start-and-exit
USER splunk
# Do whatever post-configuration, change etc files, copy apps etc.
ENTRYPOINT ["/opt/splunk/bin/splunk"]
CMD ["start"]
is there anything stopping me from doing this?🤔