First, the Splunk Universal Forwarder is a stand-alone application that’s entire job is to send data to Splunk Enterprise (or Cloud).
There is no need to complicate installing a simple, lightweight utility by embedding it in a Docker container – unless, and only unless, you need to have the UF inside a container to read logs therein.
What steps from the UF install guide have you followed?
You say you are "a bit confused on the solutions found online". What has you confused? What "solutions" have you found online?
from User warren – Stack Overflow https://stackoverflow.com/questions/67385554/configure-splunk-in-springboot-and-docker/67401904#67401904
via IFTTT