Closed anojht closed 10 months ago
@anojht
Thanks for this, i've been working on this also, however testing the build process here is failing for me also:
=> ERROR [dependencybuild 2/2] RUN --mount=target=/var/www/app/node_modules,type=cache npm install && npm run production && mv /var/www/app/storage /var/www/app/docker-backup-storage/ && mv /var/www/app/public /var/www/app/docker-backup-public/ 0.8s
------
> [dependencybuild 2/2] RUN --mount=target=/var/www/app/node_modules,type=cache npm install && npm run production && mv /var/www/app/storage /var/www/app/docker-backup-storage/ && mv /var/www/app/public /var/www/app/docker-backup-public/:
0.711 npm ERR! Tracker "idealTree" already exists
0.712
0.712 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-21T06_31_19_252Z-debug-0.log
------
Dockerfile:108
@anojht
Thanks for this, i've been working on this also, however testing the build process here is failing for me also:
=> ERROR [dependencybuild 2/2] RUN --mount=target=/var/www/app/node_modules,type=cache npm install && npm run production && mv /var/www/app/storage /var/www/app/docker-backup-storage/ && mv /var/www/app/public /var/www/app/docker-backup-public/ 0.8s ------ > [dependencybuild 2/2] RUN --mount=target=/var/www/app/node_modules,type=cache npm install && npm run production && mv /var/www/app/storage /var/www/app/docker-backup-storage/ && mv /var/www/app/public /var/www/app/docker-backup-public/: 0.711 npm ERR! Tracker "idealTree" already exists 0.712 0.712 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-21T06_31_19_252Z-debug-0.log ------ Dockerfile:108
Hi, it has been fixed, the WORKDIR
had not been set before the npm install
step. Sorry the Dockerfile in this repo is quite different than my own fork, where I originally implemented and tested the fix: anojht/invoiceninja, so it took a bit of time to adapt the fix.
Thanks! looks good.
Due to the circular dependency of
livewire
JS module from composer, without intermediate build stages, the Docker build fails during thevite
build step due to missinglivewire
module.The changes here allow
composer install
to run then copies the vendor folder to an intermediate stage in order to complete thevite
build with thelivewire
dependency being present.Then the contents are copied back in another intermediate stage to the php environment to complete the build.