Can't enter the docker container

Hello
I wanted to enter the docker container created by “docker-compose up” command but failed.
I have tried many commands such as "docker exec -it " and “docker attach”.
So how to enter an already started container?
Best regards

You’re trying to call /bin/bash explicitly, which frequently won’t exist in a lightweight container. Try just sh.

I have tried executing this command. It’s taking me inside the container, but any commands not working inside the container.