Skip to content

Update the README of hub.docker.com for production settings #498

@lucastercas

Description

@lucastercas

Usually, in production is not normally used bind-mounts, like it is suggested on the readme, on the Include pre-installed themes / plugins section, it it better to build a custom image, and just pull it to use in production, without any bind-mount.

However, if it is done like it is said on the readme, there will be permission issues on the directories, as they will be owned by root:

FROM wordpress:5.4.1-apache
COPY --chown=www-data:www-data ./my_theme /var/www/html/wordpress/wp-content/themes/my_theme

So it is better to COPY the files to /usr/src/wordpress, like so:

FROM wordpress:5.4.1-apache
COPY --chown=www-data:www-data ./my_theme /usr/src/wordpress/wp-content/themes/my_theme

This way, there will be no permission issues, as the docker-entrypoint.sh will copy then with the correct permissions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions