Skip to content

What's the reason of VOLUME-ing the /var/www/html #924

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

Closed
ttodua opened this issue Oct 6, 2024 · 3 comments
Closed

What's the reason of VOLUME-ing the /var/www/html #924

ttodua opened this issue Oct 6, 2024 · 3 comments

Comments

@ttodua
Copy link

ttodua commented Oct 6, 2024

I am about this line:

VOLUME /var/www/html

should there be /usr/src/wordpress instead of /var/www/html, or is that intentional? if so, why does it volume that directory, if that dir is nowhere referenced/used in DOCKERFILE or entrypoint

@tianon
Copy link
Member

tianon commented Oct 7, 2024

See #6 (comment) -- in short, the whole of /var/www/html is the "WordPress-managed" directory. On initial container startup, we copy /usr/src/wordpress into it, and then it's expected that WordPress manages it directly via auto-update / updates through the UI. There are other issues that describe how to circumvent that behavior if you'd like a more "traditional" container experience where WordPress is updated via container redeployments, but I really cannot recommend that (those WordPress auto-updates are your primary line of defense against WordPress security issues).

@tianon
Copy link
Member

tianon commented Oct 7, 2024

As for why that specific directory, see the php image we're FROM for details (that's the default directory over there for both Apache and FPM variants).

@ttodua ttodua closed this as completed Oct 8, 2024
@ttodua
Copy link
Author

ttodua commented Oct 8, 2024

Thanks for reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants