The code below works when being run as a regular Python process. Calling start starts a new process.
When I run the same code inside a docker container, the method my_function never gets called.
from multiprocessing import Process
def my_function(x, y):
print("process started")
def start():
p = Process(target=my_function, args=(1, 2))
p.start()
The Dockerfile has FROM python:3.8-slim-buster.
Is there some configuration needed on the Docker side to enable the multiprocessing?