However, interestingly: when I changed the existing php version constraint to e.g. Ok thanks, I don't want to do this because the project specifically works with PHP 7.2+ => the composer.json must not be touched. Or try setting php 8 in your composer.json
#Phpstorm dockerfile how to#
Would appreciate help here how to continue! OCI runtime create failed: container_linux.go:349: starting container process caused \"exec: \\\"composer\\\": executable file not found in $PATH\": unknownĮither this docker image doesn't have composer or it's not in the path.
#Phpstorm dockerfile install#
Upon invoking install however I get this error: Go it, managed to realize that in the composer prefs in PhpStorm setting indeed there's "Execution: Remote Interpreter".
But I don't see such explicit step available? That's what I thought and I'm also sure: yet I can't teach PhpStorm to respect docker for this.įor phpunit it was rather easy, I needed a new configuration entry and specifically chose the remote interpreter. If I'm correct phpstorm can also run composer update on the remote interpreter thus will allow you to install php8 dependencies. Is anyone willing / has the energy and time to help me moving forward? Would be much appreciated :) classes like Match ?), thus I need fix that but no idea (aka run composer in Docker with PHP 8). It "works" but the vendor files are still from my local host PHP composer installation and they contain incompatible code with PHP8 (e.g. I then did docker-compose build and the resulting image I selected in PhpStorm (remote interpreter) and managed to get phpunit running. I don't even know of composer is available in this image ?♀️ĭockerfile I have (don't laugh): FROM php:8.0.0RC4-cliĭocker composer (because no idea, tutorials and stuff): version: '3' In fact, I don't know how, I got it working that I can run phpunit and it runs it in the docker image but I'm too stupid to figure out how to also run composer inside the image. Super bonus: also get xdebug working in the docker image (probably need to add further install steps with pecl in Dockerfile?) so it also works via PhpStorm the php:8.0.0RC4-cli image I guess?)īeing able to install the composer dependencies via PHP within docker, important for package version resolving (this project will install different version on different PHP version to be compatible) Same as above but with PHP 8 without replacing my brew PHP 7.4 this is intended only for local dev I can also debug, I've xdebug installed via pecl Phpunit tests are running, also inside PhpStorm I've never really used docker before and I'm hitting so many walls that I stopped counting, I think today (Friday 13th) is my lucky day.