-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin install fails #417
Comments
So those root owned directories are kind of stuck like that for cli since it can't be root You can however install it from the WordPress admin panel since the user in the WordPress container has sufficient permissions. |
Hmm, that's unfortunate since the CLI image seems to be the recommended way to use the CLI with the WordPress image. Any chance a CLI image based on Debian could be published? Thanks for the explanation. :) |
So your issue is actually far simpler, it didn't make sense that an extension wanted to write to /etc/, and also that WordPress which also runs as non-root could install the extension. When you do a |
Good catch -- doc update in docker-library/docs#1539 👍 😅 |
Installing $ docker run -it -u 33 -e HOME=/tmp --rm \
> --volumes-from wordpress_wordpress_1 \
> --network container:wordpress_wordpress_1 \
> wordpress:cli plugin install wordpress-importer --activate
Installing WordPress Importer (0.6.4)
Downloading installation package from https://downloads.wordpress.org/plugin/wordpress-importer.0.6.4.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Activating 'wordpress-importer'...
Plugin 'wordpress-importer' activated.
Success: Installed 1 of 1 plugins. |
@wglambert Hmm, that looks very promising... Modified command:
Output:
I'm really stumped... I've tried several combinations of the following in my dockerfile to try to fix the permissions issue I imagine I must be running into, but nothing's fixed it:
|
Your You could try mounting just the singular volume that WordPress has mounted such as its |
Figured it out... Turns out changing the permissions of the plugins folder in the Dockerfile wasn't working... Seemed like they were getting reverted. I've added the permissions change to a setup script I run after the container is running. |
The thing is this will not solve the problem, because this is pre mounting docker volumes, so it wont have any effect, conversely if you have an entrypoint, doing exactly the same, this will fix the problem, knowing that entrypoints are executed after the volumes were mounted. Best |
I'm trying to run the following command using the CLI:
I get the following output:
I've tried adding the following to my Dockerfile, which successfully sets the directories to be owned by
www-data
, but the errors don't go away:What do I need to do to fix these errors?
The text was updated successfully, but these errors were encountered: