Nextlcoud occ command missing

I had the same problem. You have to run occ like this: docker exec -it nextcloud occ
Found the solution in this reply: Nextcloud 27.0 OCC location and integrity check - #3 by driz