-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(infra) Remove composer container and let laravel container install d… #27
Conversation
docker-compose.yml
Outdated
@@ -17,6 +17,8 @@ services: | |||
volumes: | |||
- ./Website/config/php/php.ini:/usr/local/etc/php/php.ini | |||
- ./Website/htdocs:/var/www/html | |||
command: [ "sh", "-c", "cd /var/www/html/mpmanager && php composer.phar install" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this overwrite the CMD
from the underlying Dockerfile CMD ["apache2-foreground"]
?https://hub.docker.com/layers/library/php/8.2-apache/images/sha256-39d43cc32ea91e96fa7333cd52f67b6d91c8c4b22130443db0b1ac5f26b7c738?context=explore ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmohns oh very good catch thank you for this 🙏 . I totally missed that one.
eee4f72
to
3e54054
Compare
I'm trying to run this on my local machine after deleting the Running |
3e54054
to
dbfe2f0
Compare
@dmohns TBH I didn't checked it before I pushed the 2nd change. The weird thing is that the CMD form the base image got lost even though there is nothing in between that overwrites the The defensive check in the .sh file should do the trick now. |
Yepp, it works now. I will admit I don't fully understand why this happens, but that's fine 😉 LGTM |
dbfe2f0
to
876a552
Compare
Little Github hack: You can use
syntax for this to automatically close the linked issue, once the PR is merged 😉 |
#25
The laravel conitainer explicitly installs the soap extension in order to use the soapClient. After evaluating both
I decided to go with the 2nd option as having a separate composer container has no extra value over let the main php container install the dependencies.
How to test;
docker-compose up --build
this should already re-build the laravel containerWebsite/htdocs/mpmanager/