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

**URL:** <https://discourse.cakephp.org/t/cake-php-2-x-bake-error-in-cli-php-apache-docker/10061>\
**Category:** Need Help\
**Created:** [January 10, 2022, 1:25am UTC](https://discourse.cakephp.org/t/cake-php-2-x-bake-error-in-cli-php-apache-docker/10061 "2022-01-10T01:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigcouve](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bigcouve](https://discourse.cakephp.org/u/bigcouve)\
**Post date:** [January 10, 2022, 1:25am UTC](https://discourse.cakephp.org/t/cake-php-2-x-bake-error-in-cli-php-apache-docker/10061/1 "2022-01-10T01:25:04Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Jawfin](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jawfin](https://discourse.cakephp.org/u/Jawfin)\
**Post date:** [January 10, 2022, 3:18am UTC](https://discourse.cakephp.org/t/cake-php-2-x-bake-error-in-cli-php-apache-docker/10061/2 "2022-01-10T03:18:55Z")

</div>

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.
