docker exec on container docker-compose code example
Example 1: docker run command on container
sudo docker exec -it <container name> <command>
Example 2: docker compose exec compose
docker compose exec <your service name> <execute this command>