Yes, and no. This is totally normal. (A bunch of normal prepackaged things like nginx and Apache and database servers and multi-threaded or multi-process.)
Yes. If you
docker exec into the container and it has the right tools installed, you can run
ps and see the forked process.
The one important caveat (which again you will see with
ps) is that the main container process runs as process ID 1 within the container, which gives it some extra responsibility. If you fork(), and your child process fork()s and then exits, the container’s main process will wind up as the parent of the grandchild process. If you then waitpid() you might see process IDs from those descendant processes that you never saw as return values from fork().
IMHO the one compelling reason to run an init process in your container is to take care of this for you. (“My main container process is in a scripting language and depends on shelling out to tools that aren’t good at cleaning up after themselves.”) I’ve seen tini used in the past for this;
docker run has an --init option (which runs tini under the hood) but you need to remember to include it on every
docker run invocation; it’s probably better to make sure to include an init in your image’s Dockerfile.