DEV Community

Discussion on: Docker configuration with Nginx routing for Vue and Laravel

Collapse
 
homeynow profile image
homeynow

Hello Philip,
i tried this one and i am getting this error. Can you help me?
Step 2/11 : COPY composer.lock composer.json /var/www/html/
COPY failed: file not found in build context or excluded by .dockerignore: stat composer.lock: file does not exist

thank you

Collapse
 
dlgombert profile image
Daniel Gombert

Hay homeynow - this is because the file is copied over before composer install. In other words, you don't have a composer.lock file yet. There's probably a better way to do this, but for now on the host side, just create a file called composer.lock in your backend-code container. That will fix this.