Skip to content

Add WORDPRESS_DB_SSL variable to support connection to the DB with TLS #558

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
wants to merge 1 commit into from

Conversation

jrrdev
Copy link

@jrrdev jrrdev commented Jan 8, 2021

To enforce using TLS to connect to the database, before this PR the only way was to use:

WORDPRESS_CONFIG_EXTRA: |-
        define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);

Nevertheless, the entry-point was never using TLS to connect to the database.
This leads to connection errors if MySQL was configured with --require-secure-transport=ON and can trigger some fail2ban mechanism.

This PR adds a new env variable WORDPRESS_DB_SSL to configure properly the TLS connection in the entry-point and in Wordpress.

@tianon
Copy link
Member

tianon commented Jan 8, 2021

See #557 (which you should be able to more easily test once docker-library/official-images#9390 merges), which completely changes the way this is managed (and is our planned solution going forward).

With that PR's change, you should be able to define WORDPRESS_CONFIG_EXTRA as you have here and it will Just Work. 😄

@tianon
Copy link
Member

tianon commented Feb 1, 2021

Closing given that this should "just work" with #557 (which can be tested by using the beta variants of the tags on the published images at https://hub.docker.com/_/wordpress, and will become the default in WordPress 5.7+).

@tianon tianon closed this Feb 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants