DEV Community

Discussion on: Deploying Your Laravel App on Docker, With NGINX and MySQL

Collapse
 
luudanhnhan1102 profile image
Luudanhnhan1102

Hi Brian, can you help me to figure it out this error :

Step 11/11 : RUN php artisan optimize
---> Running in 3f514d7b9d8f
Command "optimize" is not defined.
ERROR: Service 'app' failed to build: The command '/bin/sh -c php artisan optimize' returned a non-zero code: 1

I have searched this bug on google but cant find an answer to this problems... I hope you will answer me...
Thank you so much...

Collapse
 
baliachbryan profile image
Brian Baliach

Hello there Ludan

As a temporary fix for your error, comment out that line (php artisan optimize) then run docker-compose up then try and running the command after your container has been deployed

Collapse
 
luudanhnhan1102 profile image
Luudanhnhan1102

thank you so much for this advice <3