Result in the container is:
root@07acb280f9e5:/# echo ${SPRING_PROFILES_ACTIVE}
perf15
But I got issue went container start filebeat (version 5.1.1):
Exiting: error unpacking config data: missing field accessing 'fields.env' (source:'/etc/filebeat/filebeat.yml')
I have seen a topic: Cannot use env variables in filebeat! but in my container cannot use the command: systemctl import-environment:
root@07acb280f9e5:/# systemctl import-environment
bash: systemctl: command not found
Which init script are you using? Init scripts normally start processes in the background and return. In this case the container will shutdown right after startup, cause the script didn't block.
No, init scripts are in general not supposed to be used directly from within docker containers. This is true for any init script, not just Beats.
Users wanting to run multiple services in one container often use runit. But this is not required just for running a container. Tools/services often have custom scripts as entry-points. See official docker containers.
Why do you build your own container instead of building on or reusing the existing containers?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.