![]() If you see a better way to setup composer I'm happy to hear about a better way.# This script wraps docker-php-ext-install, properly configuring the system. Now I'm stuck due to the initially mentioned libzip issue. xdebug xdebug.mode develop,debug xdebug.clienthost xdebug.startwithrequest yes xdebug.log /tmp/xdebug.log Want to control the amount of information Xdebug logs You can configure the amount of information that Xdebug writes to the log file by making use of xdebug.loglevel. When finally able to run the composer install command within the container, it told me that the zip extension is needed which is why I've added the docker-php-ext-install zip command. Hence the reason for this workaround (changing the user is also what the official docs recommend according to the link above). I first tried to simply run the last line composer install -no-dev, which actually won't work, as the container won't let you execute root commands used by default by composer. RUN groupadd -r user & useradd -r -g user user If I understood it correctly, doing it in this way allows you to share your image without your colleagues needing to install composer / download the packages locally everything will then be done within the container. How can I Install libzip to finally get things running?Ī few notes on my Dockerfile lines feel free to correct me if I'm wrong in the setup it's the first time I'm doing this: COPY -from=composer:latest /usr/bin/composer /usr/bin/composerĪs I understood it, the official docs tell you to use this multi-stage approach to get composer running in your PHP Docker container in an optimal way. I can however not find that package, no matter if via pecl, via apt-get as most of the forum posts refer to. The composer installation fails at the point where it's telling me that the libzip package is needed. Content of my Dockerfile: FROM php:8.1-apacheĬOPY -from=composer:latest /usr/bin/composer /usr/bin/composer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |