install app with composer #227
-
|
Helo. I want to annoy you again My Dockerfile: Copier la configuration msmtpCOPY msmtprc /etc/msmtprc Définir les permissions pour le fichier de configurationRUN chmod 600 /etc/msmtprc the log build: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hello @mjeandon Just to clarify - the Docker images I provide do not include any framework source code. They only serve as runtime environments for PHP code and necessary extensions to run the framework. If you want to install packages using Composer, please make sure you've copied your project’s source code (including the For example: FROM shinsenter/codeigniter4:latest
### Copy your project’s source code (E.g in ./src/) into the web root directory
COPY ./src/ $APP_PATH/
### Install Composer packages
RUN composer require mpdf/mpdf voku/simple_html_dom
### Install other middlewares (such as msmtp)
....
However, this approach may significantly increase the final size of the Docker images. Another way is to pre-install the packages globally, so they won’t depend on your project’s For example: FROM shinsenter/codeigniter4:latest
### Global installation of Composer packages
RUN composer global require mpdf/mpdf voku/simple_html_dom
### Copy your project’s source code (E.g in ./src/) into the web root directory
COPY ./src/ $APP_PATH/
RUN composer dump-autoload
### Install other middlewares (such as msmtp)
....
All the points I mentioned above are related to using the Composer command. I’d really appreciate it if you could take some time to go through Composer’s FAQs. Best regards |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. |
Beta Was this translation helpful? Give feedback.
Hello @mjeandon
Just to clarify - the Docker images I provide do not include any framework source code. They only serve as runtime environments for PHP code and necessary extensions to run the framework.
If you want to install packages using Composer, please make sure you've copied your project’s source code (including the
composer.jsonfile) into the web root directory inside the container before runningcomposer installto proceed with the package installation.For example: