chriszarate / docker-compose-wordpress

An example Docker Compose setup for WordPress plugin or theme development.
162 stars 54 forks source link

Composer directory for packages couldn't be created. #8

Closed MikeiLL closed 6 years ago

MikeiLL commented 6 years ago

Hi Chris.

I'm installing a composer package from github via wp-cli, but getting the above error.

Logged into the Wordpress container and $WP_CLI_PACKAGES_DIR was empty. Maybe that means that Composer will just look for the default location ~/.wp-cli/packages.

That directory was owned by root but I changed ownership to www-data. I also exported the Env Variable in ~/.bashrc and sourced it: export WP_CLI_PACKAGES_DIR="~/.wp-cli/packages".

Still getting the same error and I'm hoping you might have some insight as to why.

chriszarate commented 6 years ago

Apologies: awhile back I removed Composer from the underlying docker-wordpress image. The reason for this was strict separation of concerns. I only add what would be impossible to use external to the container, e.g., Xdebug. Composer could easily be run on the host machine or in a separate container with the same data volumes mapped to it.

I will update the docs accordingly.

MikeiLL commented 6 years ago

Thank you, Chris. Much appreciated.