I was trying to open a second terminal un a docker with docker-compose.
First run the container with
docker-compose run my-centos bash
I solved this issue by first running sudo systemctl restart docker