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
you need to do "docker-compose up -d" then try ur commands