Skip to content
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

avoid tar extraction failure if wp-content is bind-mounted read-only #281

Closed
drzraf opened this issue Feb 20, 2018 · 2 comments
Closed

avoid tar extraction failure if wp-content is bind-mounted read-only #281

drzraf opened this issue Feb 20, 2018 · 2 comments
Labels
Request Request for image modification or feature

Comments

@drzraf
Copy link

drzraf commented Feb 20, 2018

Bind-mounting the whole wp-content is useful (for plugins, themes, medias, ...), especially if sharing it or testing purpose.
Bind-mounting read-only has its own use (readonly version of the website, development, debugging, ...)

Sadly the current call to tar also extract wp-content/plugins/akismet and wp-content/themes/twenty*which are, AFAICT, the only upstream directories inside wp-content.
These breaks if wp-content is bind-mounted readonly.

Could we think about a way to optionally omit extraction of wp-content? (environment?)

@wglambert wglambert added the Request Request for image modification or feature label Apr 25, 2018
@tianon
Copy link
Member

tianon commented Feb 6, 2019

Sorry for the delay here. I'm definitely wary about adding more custom logic to our extraction code, especially to make parts of it more optional than they are (we've done a lot of acrobatics to try and make sure it doesn't clobber permissions unnecessarily on bind mounts, for example).

Is there not a smaller set of things you could bind-mount or provide in order to accomplish your goals?

For example, you could have a short Dockerfile which simply does something like FROM wordpress:xxx followed by RUN rm -rf /usr/src/wordpress/wp-content in order to make sure none of wp-content even exists to copy.

You could also perform your read-only bind-mount on top of /usr/src/wordpress/wp-content instead so that your bind-mounted contents get copied to /var/www/html (instead of bind-mounting directly into /var/www/html), for example.

@drzraf
Copy link
Author

drzraf commented Feb 7, 2019

I long ago switched to bedrock.

@yosifkit yosifkit closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

4 participants