Cake php 2.x bake error in cli php-apache (docker)

Hello everyone, i hope you be having a good day.

I have a problem to use cake bake in my app in cli php-apache (docker, in container) how shows below:

root@44ced3d5466e:/app/app# Console\cake bake all
bash: Consolecake: command not found
root@44ced3d5466e:/app/app# Console/cake bake all
/usr/bin/env: ‘bash\r’: No such file or directory
root@44ced3d5466e:/app/app# ./cake bake all
bash: ./cake: No such file or directory
root@44ced3d5466e:/app/app# cd console
root@44ced3d5466e:/app/app/console# ./cake bake all
/usr/bin/env: ‘bash\r’: No such file or directory

I tried those commands, but without sucess… beyond this, i tried install cake bake by composer, but only works in versions 3.x on

Although I am not familiar with Cake 2, cake itself is an application, so first locate where it is. In Cake 4 its in a /bin/ folder. Once located it may be cake.php which would requires a working CLI PHP to execute it. If its a bash script then ensure it has executable rights, chmod 755.

1 Like