That should not give you any error as it would run the container in the background so it indeed must be something with Docker itself.
How did you install Docker? Please, share the output of the following commands
docker info
docker version
(you can remove parts you don’t want to share like registry addresses or username)
And if the host is Linux, also the output of these
dpkg -l | grep docker
snap list docker
And when you share the output, please use code blocks. More info is in our formatting guide: How to format your forum posts