我想在我的 Docker 中安装 Drush 但没有 Drupal 容器。 我有 nginx、php 和 mysql 作为容器,我想知道我是否可以在我的 php 容器中安装 Drush,例如模块。 因为我将其用作 Web 开发环境,所以我不想更具体地使用 Docker,因此我可以安装任何 CMS 或其他 Web 项目。
我可以吗?如果是,怎么办?
最佳答案
尝试制作您自己的容器,包括在您的 dockerfile 中:
RUN export COMPOSER_HOME=/usr/local/composer && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer global require drush/drush:6.5.0 && \
composer global install && \
ln -s /usr/local/composer/vendor/drush/drush/drush /usr/local/bin/drush
您也可以使用 yoshz 图像(包括 apache):
关于php - 如何在没有 Drupal 容器的情况下安装 Drush,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46151657/