Comments (3)
The best way is to implement your own Dockerfile, and copy custom .ini config file into the container.
By default our docker php images implement this configuration:
memory_limit = 2G
max_execution_time = 1800
zlib.output_compression = On
cgi.fix_pathinfo = 0
date.timezone = UTC
upload_max_filesize = 20M
post_max_size = 20M
So I recommend you to modify your specific docker-compose.dev.linux.yml
or docker-compose.dev.mac.yml
and add this lines in the phpfpm
service phpfpm
, instead of the image
tag:
phpfpm:
build: ./config/dockergento/phpfpm/ # here just add the route where your new Dockerfile is going to be placed
Then create the Dockerfile with the following content:
FROM modestcoders/php:7.1-fpm-1 // again here add the version of the image you are using (7.2 for example)
USER root
COPY ./conf/*.ini /usr/local/etc/php/conf.d/ // here the route where your .ini files is going to be placed
USER app:app
Then just create your own .ini file (for example custom-config.ini) adding your own memory setting: memory_limit=-1
or whatever you want!
After that you will've to rebuild the containers with the new images, so run dockergento rebuild
Let me know it this explanation helps you! Thank you for giving a try to the tool!
from magento2-dockergento.
Hello @danielozano
Thank you very much for this helpful guide!
This worked very well!
I did notice that xdebug was not working with this new setup, and I had a look at https://github.com/ModestCoders/dockerfiles/blob/master/php/7.2-fpm/Dockerfile
..and decided to use that config directory in my docker file too
My Dockerfile now looks iike
# build ontop of the PHP 7.2 image
FROM modestcoders/php:7.2-fpm-1
USER root
# add ini files in a path relative to this Dockerfile
COPY conf/www.conf /usr/local/etc/php-fpm.d/
COPY conf/php.ini /usr/local/etc/php/
COPY conf/xdebug.ini /usr/local/etc/php/conf.d/
COPY conf/php-fpm.conf /usr/local/etc/
USER app:app
Thank you very much again for being so helpful, and I do really enjoy using dockergento <3
from magento2-dockergento.
Hi @WinstonN , I'm glad this helped you!
Probably the x-debug problem was because of this line COPY ./conf/*.ini /usr/local/etc/php/conf.d/
. My fault! You should've pointed you to use another custom file name instead of the original!
Regards! Thank you so much for using the tool!
from magento2-dockergento.
Related Issues (20)
- Feature request: add support for Magento 2 EE HOT 3
- Feature request: Add container for cron jobs HOT 1
- Mailhog Setup HOT 2
- modestcoders/node-php:node8-php7.3 is not avalible HOT 4
- how to set it as production HOT 2
- PHP 7.4 Support HOT 3
- SQLSTATE[HY000] [2002] No such file or directory HOT 1
- Path cannot be mirrored HOT 1
- Multiple database HOT 1
- Composer github oauth
- sample data install fails / composer error php 7.2 magento v 2.3.2 HOT 2
- Can't copy project files into host HOT 1
- Grunt compilation failure
- FEATURE: Mage2run HOT 3
- PHP 8 version
- Apple silicon m1
- More detailed docs?
- nginx version
- permission issues
- Magento 2.4.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-dockergento.