modestcoders / magento2-dockergento Goto Github PK
View Code? Open in Web Editor NEWFastest Magento 2 Docker dev environment ever for Mac and Linux
Fastest Magento 2 Docker dev environment ever for Mac and Linux
Hi, do you have a plan to make php8 container?
Hy, i have installed magento 2.3.2 with your tool the basics are find but if i want to install the magento sample i get the following error.
php version used: 7.2
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
i checked the php memory this is the output
biopack dockergento exec php -r "echo ini_get('memory_limit').PHP_EOL;" 2G
then i noticed the container is still running composer v1 when i tried upgrading this to v2 i got the following error:
`biopack dockergento exec composer self-update --2
[Symfony\Component\Console\Exception\RuntimeException]
The "--2" option does not exist.
`
how can i upgrade composer (preferable) or install the sample files, please advise me
Hi guys,
Magento2.3 now support PHP 7.3.
Would it be possible to make dockergento compatible with this new version? :)
Thx in advance!
Kind regards
Tristan
Hi, do you have a plan to make magento 2.4.5 compatibile wich dockergento?
hy is it possible to add magerun2 to the docker compose ? and run it from dockergento ?
It would be great to have a builtin container for running cron jobs .
Hello!
I am sure I did something screwy on my end, but I am trying to initialise a new project and I am getting the error
ERROR: .IOError: [Errno 2] No such file or directory: u'./docker-compose.yml'
Docker is not properly configured. Please execute:
dockergento setup
when I run dockergento setup I get
Setting up dockergento config files
> cp /../../../magento2-dockergento/bin/../config/dockergento/ -> config/dockergento
cp: cannot stat '/../../../magento2-dockergento/bin/../config/dockergento/': No such file or directory
This did work previously, and I am sure this is something I did wrong, but can you help me track it down?
Thank you!
Hi ,
dockergento run on windows machine?
On a mac, when I run dockergento mirror-host app dev generated pub var, I get this error:
Path cannot be mirrored. Following path is a bind mount inside container:
Magento is built up from a lot of packages. Have you considered installing the composer plugin hirak/prestissimo into the box, it drastically improves the speed of installation.
Currently dockergento has only Magento 2 CE edition.
I think it's a good idea to add ability to choose CE/EE edition as additional step during project create.
Hi, I was able to get to Installation Page, on fresh magento but cannot add db connection.
SQLSTATE[HY000] [2002] No such file or directory
When I try 127.0.0.1 its Connection Refused.
I am able to connect from container with mysql -u magento -pmagento, but not from web.
same from cli installer
Any idea what I am missing?
Right now Dockergento using custom 9001 port for xdebug.
https://github.com/ModestCoders/magento2-dockergento/blob/1e7b9b510413d3a8a48f17cd15b5c3ff98053c7b/docs/xdebug_phpstorm.md
Is there any reason to have custom port, instead of default one - 9000? I think switching to 9000 port will lead to easier xdebug configuration
Hi!
Would it be possible to add n98-magerun2 to the container?
What would be the best way to customize it myself (if not added out of the box)?
Thanks!
Hi Hi,
I am looking to use dockergento (I love it so much) on my current project, but the setup is a little different
I run a mac now - not sure if this info would help
Essentially everything is in a directory called src
When I run
dockergento setup
I specify the paths, which results in this config properties file
(I did specify all paths as ./src/ but only the bin dir kept the ./)
MAGENTO_DIR="src"
COMPOSER_DIR="src/vendor"
BIN_DIR="./src/vendor/bin"
However, on the first start I get this error message
➜ dockergento start
Starting containers in detached mode
Starting magento2_db_1 ... done
Creating magento2_phpfpm_1 ... done
Creating magento2_nginx_1 ... done
Vendor cannot be a bind mount. Please do the following:
1. Remove from your docker-compose configuration:
- ./<host_path>:/var/www/html/src/vendor/composer.lock
2. Execute:
dockergento rebuild
After doing those steps, dockergento starts up fine, but the container, seems to miss almost all of the files
It only contains
➜ dockergento bash
app@b60e9463a17c:~/html$ ls -la
total 668
drwxr-xr-x 5 app app 4096 Apr 3 08:20 .
drwxr-xr-x 5 app app 4096 Apr 3 08:20 ..
drwxr-xr-x 2 app app 64 Mar 18 08:48 .git
drwxr-xr-x 9 app app 288 Apr 2 19:40 app
-rw-r--r-- 1 app app 10432 Apr 2 22:31 composer.json
-rw-r--r-- 1 app app 661650 Apr 2 22:31 composer.lock
drwxr-xr-x 3 app app 96 Apr 3 08:20 config
I thought I could copy the files over with
➜ dockergento mirror-host src/ /var/www/html/src/
But this gives me an error, forcing me to copy directory by directory
Which also doesn't work
Essentially, I never get to a working site
Here is my docker-compose.dev.mac.yml file
version: "3"
services:
phpfpm:
volumes: &appvolumes-mac
- ../.composer:/var/www/.composer:delegated
- workspace:/var/www/html
- ./src/app:/var/www/html/src/app:delegated
- ./.git:/var/www/html/.git:delegated
- ./config:/var/www/html/config:delegated
- ./.circleci:/var/www/html/.circleci:delegated
- ./.gitignore:/var/www/html/.gitignore:delegated
- ./CHANGELOG.md:/var/www/html/CHANGELOG.md:delegated
- ./README.md:/var/www/html/README.md:delegated
- ./ami:/var/www/html/ami:delegated
- ./appspec.yml:/var/www/html/appspec.yml:delegated
- ./docs:/var/www/html/docs:delegated
- ./env:/var/www/html/env:delegated
nginx:
volumes: *appvolumes-mac
node:
volumes: *appvolumes-mac
unison:
image: modestcoders/unison:2.51.2
volumes:
- workspace:/var/www/html
- ./src/vendor:/sync/src/vendor
environment:
- SYNC_SOURCE_BASE_PATH=/sync
- SYNC_DESTINATION_BASE_PATH=/var/www/html
- SYNC_MAX_INOTIFY_WATCHES=60000
depends_on:
- phpfpm
privileged: true
volumes:
workspace:
How can I fix this?
Hello, how do I have more than one database in the same project? Thanks
How do we approach mailhog setup for dockergento ? If it's something we can go for, i am happy to contribute.
Composer keeps failing Your github oauth token for api.github.com contains invalid characters since github updated token format the dockergento composer fails with error :
Your github oauth token for api.github.com contains invalid characters: "_"
Hello guys,
As Magento 2.4.0 just released it recommends to run the new Magento installation with PHP 7.4. Is there any plan to support this php version in the near future?
Thanks,
Executing 'dockergento grunt exec' throws ' PHP Parse error: syntax error, unexpected 'LinkRepositoryInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /var/www/html/app/code/ffff/aaaa/Helper/Data.php on line 44
Exited with code: 255.
Error executing child process: Error: Process exited with code 255'
php -7.4
node 7.3
I get the following error after setting dockergento up and running dockergento composer install
:
Warning: require(/var/www/html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 70
Fatal error: require(): Failed opening required '/var/www/html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='/var/www/html/vendor/magento/zendframework1/library:.:/usr/local/lib/php') in /var/www/html/vendor/composer/autoload_real.php on line 70
Then to check if everything is installed correctly, I rerun dockergento composer install
, but the command echos:
First time setup: copying all files from container
> removing vendor content: '././vendor/*'
After that my vendor folder inside the container is empty.
I have set the project up - and the containers for PHP, nginx, elasticsearch and db exist.
Then, I try to execute dockergento composer install
. The command starts, but then it seems to
dockergento composer install
Validating composer before doing anything
Mirror vendor into container before executing composer
Start mirror copy of host into container
vendor -> phpfpm:vendor
> validating and sanitizing path: 'vendor'
> removing destination dir content: 'phpfpm:./vendor/*'
> ensure destination dir exists: './vendor'
> copying './vendor/.' into 'phpfpm:/var/www/html/./vendor'
> setting permissions: chown -R app:app /var/www/html/./vendor
Host mirrored into container
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package egeloen/http-adapter is abandoned, you should avoid using it. Use php-http/httplug instead.
Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Package zendframework/zend-captcha is abandoned, you should avoid using it. Use laminas/laminas-captcha instead.
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-config is abandoned, you should avoid using it. Use laminas/laminas-config instead.
Package zendframework/zend-console is abandoned, you should avoid using it. Use laminas/laminas-console instead.
Package zendframework/zend-crypt is abandoned, you should avoid using it. Use laminas/laminas-crypt instead.
Package zendframework/zend-db is abandoned, you should avoid using it. Use laminas/laminas-db instead.
Package zendframework/zend-di is abandoned, you should avoid using it. Use laminas/laminas-di instead.
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Package zendframework/zend-escaper is abandoned, you should avoid using it. Use laminas/laminas-escaper instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Package zendframework/zend-feed is abandoned, you should avoid using it. Use laminas/laminas-feed instead.
Package zendframework/zend-filter is abandoned, you should avoid using it. Use laminas/laminas-filter instead.
Package zendframework/zend-form is abandoned, you should avoid using it. Use laminas/laminas-form instead.
Package zendframework/zend-http is abandoned, you should avoid using it. Use laminas/laminas-http instead.
Package zendframework/zend-hydrator is abandoned, you should avoid using it. Use laminas/laminas-hydrator instead.
Package zendframework/zend-i18n is abandoned, you should avoid using it. Use laminas/laminas-i18n instead.
Package zendframework/zend-inputfilter is abandoned, you should avoid using it. Use laminas/laminas-inputfilter instead.
Package zendframework/zend-json is abandoned, you should avoid using it. Use laminas/laminas-json instead.
Package zendframework/zend-loader is abandoned, you should avoid using it. Use laminas/laminas-loader instead.
Package zendframework/zend-log is abandoned, you should avoid using it. Use laminas/laminas-log instead.
Package zendframework/zend-mail is abandoned, you should avoid using it. Use laminas/laminas-mail instead.
Package zendframework/zend-math is abandoned, you should avoid using it. Use laminas/laminas-math instead.
Package zendframework/zend-mime is abandoned, you should avoid using it. Use laminas/laminas-mime instead.
Package zendframework/zend-modulemanager is abandoned, you should avoid using it. Use laminas/laminas-modulemanager instead.
Package zendframework/zend-mvc is abandoned, you should avoid using it. Use laminas/laminas-mvc instead.
Package zendframework/zend-psr7bridge is abandoned, you should avoid using it. Use laminas/laminas-psr7bridge instead.
Package zendframework/zend-serializer is abandoned, you should avoid using it. Use laminas/laminas-serializer instead.
Package zendframework/zend-server is abandoned, you should avoid using it. Use laminas/laminas-server instead.
Package zendframework/zend-servicemanager is abandoned, you should avoid using it. Use laminas/laminas-servicemanager instead.
Package zendframework/zend-session is abandoned, you should avoid using it. Use laminas/laminas-session instead.
Package zendframework/zend-soap is abandoned, you should avoid using it. Use laminas/laminas-soap instead.
Package zendframework/zend-stdlib is abandoned, you should avoid using it. Use laminas/laminas-stdlib instead.
Package zendframework/zend-text is abandoned, you should avoid using it. Use laminas/laminas-text instead.
Package zendframework/zend-uri is abandoned, you should avoid using it. Use laminas/laminas-uri instead.
Package zendframework/zend-validator is abandoned, you should avoid using it. Use laminas/laminas-validator instead.
Package zendframework/zend-view is abandoned, you should avoid using it. Use laminas/laminas-view instead.
Generating autoload files
Processing patches configuration
Nothing to patch
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> cp -Rfp patches/. .
> find . -type l -exec test ! -e {} \; -delete
Stopping shop-dockerized_nginx_1 ... done
Stopping shop-dockerized_db_1 ... done
Stopping shop-dockerized_elasticsearch_1 ... done
Stopping shop-dockerized_phpfpm_1 ... done
Copying all files from container to host
> removing vendor in host: '././vendor/*'
> copying 'phpfpm:/var/www/html/.' into '.'
Starting containers in detached mode
ERROR: Version mismatch: file ./docker-compose.yml specifies version 3.0 but extension file ./docker-compose.dev.mac.yml uses version 3.7```
And when I check the contents of that file (docker-compose.yml
), the contents have been reverted to a previous version of the file.
As I thought this could be related with some dockergento git rollback, I've also comitted the docker-compose.yml file generated by dockergento setup - but the result is the same.
Do you have some clue of what's going on?
Hi, do you have a plan to make m1 chip support?
I'm getting the following error when installing Magento 2.3.2:
In ErrorHandler.php line 61:
Warning: Use of undefined constant SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 - assumed 'SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13' (this will throw an Error in a future version of PHP) in /var/www/html/vendor/magento/framework/Encryption/Encryptor.php on line 153
Also see magento/magento2#23405
Hello,
Copying project files into host
Error: No such container:path: 1bace0dfbb1dde23c48e245768f46d17cba1891d251947c64b56b030224b8a18:/var/www/html/dockergento-create-project-tmp/.gitignore
My English isn't good so I look forward to helping.
Thank you,
Hi,
thank you for great tool.
Seems there's a problem with session.
I created new Magento 2.2.8 project, created simple product. Went to product page and tried to add a product.
Magento is giving an issue: http://prntscr.com/n3nelt
Docker - http://prntscr.com/n3ndbf
Thanks!
do we have a newer based nginx v1.20 ? v1.13 is the current with some security issues
Can you add Elasticsearch because Magento 2.3.1 now has ElasticSearch 6 enabled by default.
https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/es-config-nginx.html
Hi there,
Firstly, thanks for providing such a useful Docker environment — the best and fastest I've tried for Magento 2 development so far.
After every restart, there's a period where the web server will "502 Bad Gateway" instantly. At first this was quite annoying because I don't have an indication of when it has "finished" restarting, even though the command itself works quickly. Now I just look at OSX Activity Monitor, and check when the CPU has died down; com.docker.hyperkit will use 120%+ CPU during the 502 error, but Nginx will work well after the CPU has done "doing its thing".
What is it actually doing? Is there a verbose command option that ensures the work is done synchronously? On a large project with app and pub as delegated mounts this is now taking multiple minutes to finish, and it can be quite annoying because as you know, the container restarts often (during copy operations, debugging on/off, etc).
Happy to look into this myself.. I might need some tips.
Thanks
I believe Magento 2.3 supports PHP 7.2 out of the box now and it would be great if dockergento setup
would allow you to pick PHP 7.2.
can someone help me with this
Error: Something is wrong, HOST_UID cannot have id 0 (root).
Hi, after make dockergento setup and upload the sql dump of db, magento show Autoload Error.
I missing any step?
I use Osx Catalina.
tnx for help
When i run the $ dockergento grunt exec or $dockergento grunt watch i get the following:
➜ $ dockergento grunt watch
Starting server_db_1 ... done
Starting server_elasticsearch_1 ... done
Starting server_phpfpm_1 ... done
Pulling node (modestcoders/node-php:node8-php7.3)...
ERROR: manifest for modestcoders/node-php:node8-php7.3 not found: manifest unknown: manifest unknown
So this is an error that node8-php7.3 is not available. When I check this on https://github.com/ModestCoders/dockerfiles/tree/master/node-php, 7.3 seems not existing. When the docker-compose.yml, rule 38 to image: modestcoders/node-php:node8-php7.2 it works. I do get other errors after that, so this might not be a solution. Just pointing out that something is wrong here?
How can i setup magmi in nginx configuration?
I tried to add this one but wasnt successfull.
macopedia/magmi-m2#23
Hello @jalogut thanks for the contribution really is so fast in osx.
I'm trying to set up the ssl but I'm having some issues and I can't see the logs in the container, I installed openssl and generate the certificate but I can't make it work, do you know some quick config?
Thank you
how to set it as production
Hi,
I am playing with large csv imports - on importing a 20MB 1 000 000 row csv I get
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.Command exited with non-zero status 255
What is the best way to change php.ini settings?
Thanks!
Could you add Varnish cache, please!) Magento recomends to use Varnish instead of standart cache.
I have got this error Nginx: 413 – Request Entity Too Large Error
while uploading a json file to the server, that is some imports data imports for some mega menu that I just started using.
anyways I'm getting this issue now and finally found out that it's a problem with ngnix configs according to this.
I will submit a PR for it now!
Hello,
Your docker setup is amazing, and I have been using it exclusively - Thank you for putting it together <3
I am trying to debug my code using xdebug, and when I do dockergento debug-on
i get the error
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"phpfpm\": executable file not found in $PATH": unknown
# start debug mode
dockergento debug-on
# error
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"phpfpm\": executable file not found in $PATH": unknown
Could you please help me figure out why this error happens?
Thanks!
Would be great to have support for mutagen.io.
For reference we can see following example:
https://github.com/magento/magento-cloud-docker/blob/6caf597f32cecca0a9d1c04f463e819fbec5ee4c/dist/mutagen.sh
Hi!
What are docker-compose.dev.yml files for?
Where can I get Nginx logs?
Where can I get PHP logs ?
How can I edit php.ini (for general PHP settings) and ext-debug.ini (for xdebug settings)?
How can I import/export SQL dump from/into DB container?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.