Wordpress latest does not works with mysql latest container.
I get below error in wordpress container logs.
Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22
MySQL Connection Error: (2054) The server requested authentication method unknown to the client
MySQL Connection Error: (2054) The server requested authentication method unknown to the client
Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22
MySQL 8 changed the password authentication method. You're looking for the mysql_native_password plugin
https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html
So you'll want to connect with mysql --default-auth=mysql_native_password -p
Or you could use mysql 5.7
https://github.com/docker-library/mysql/issues/424#issuecomment-387403312
Thanks @wglambert but how do I add this to my mysql image. I need to use public image and not self build one's
You just add it to the command (after the image on a docker run). Here is a docker compose:
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: example
mysql:
image: mysql:5.7
# or
image: mysql:8
command: '--default-authentication-plugin=mysql_native_password'
# common options
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
(Closing, since this is an issue with usage, not with the image. In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.)
@yosifkit I am not sure if I am right in here but wouldn't the command option fail in this case as it would override the original command in the image. I do see it's in quotes but wouldn't it become the command that was passed to it.
@tianon The reason I opened it as an issue so as to address it in wordpress rather than passing an extra argument. I was hoping to have a more general solution in the wordpress image itself rather than disabling a nice security feature in mysql. Thoughts?
PHP itself doesn't support the new authentication type in MySQL 8, so even
if we wanted to patch WordPress to support it, we can't right now.
@shubhamrajvanshi it shouldn't fail, since we are not overriding the entrypoint. The command becomes the arguments to the entrypoint and when the entrypoint gets arguments that are only flags (-*) it assumes they are flags for mysqld and eventually launches it with those provided flags.
Which is why these work:
$ docker run -it --rm mysql:8 --version
/usr/sbin/mysqld Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)
$ docker run -it --rm mysql:8 --verbose --help --default-authentication-plugin=mysql_native_password | grep default-authentication-plugin
--default-authentication-plugin=name
default-authentication-plugin mysql_native_password
MySQL 8 changed the password authentication method. You're looking for the mysql_native_password plugin
https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.htmlSo you'll want to connect with
mysql --default-auth=mysql_native_password -pOr you could use mysql 5.7
Many thanks for suggest !
this does not work for us. we still get same error even after using
command: '--default-authentication-plugin=mysql_native_password'
mysql logs show
2020-01-22T21:38:18.887341Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2020-01-22T21:38:19.130956Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
wp logs show
[22-Jan-2020 21:38:19 UTC] PHP Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22
[22-Jan-2020 21:38:19 UTC] PHP Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22
MySQL Connection Error: (2054) The server requested authentication method unknown to the client
ref:
https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
@siddjain whats your wordpress version (exact image tag)?
this is what we have
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest 3a5e53f63281 7 days ago 465MB
wordpress latest 1b1624b63467 3 weeks ago 539MB
thanks
From: Buk Bukowski notifications@github.com
Sent: Wednesday, January 22, 2020 1:48 PM
To: docker-library/wordpress wordpress@noreply.github.com
Cc: siddjain siddjain@live.com; Mention mention@noreply.github.com
Subject: Re: [docker-library/wordpress] Wordpress latest does not works with mysql latest container (#313)
@siddjainhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsiddjain&data=02%7C01%7C%7C1c832f7786274b3b98f308d79f84caec%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153264991435497&sdata=VZW3b2Pe4EzMV%2FUFd0%2FQcGiT9lrAIw1p6wpWLGQ2X4c%3D&reserved=0 whats your wordpress version (exact image tag)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fwordpress%2Fissues%2F313%3Femail_source%3Dnotifications%26email_token%3DAAFZEMN2FWCRKYZTKWK4KLLQ7C5KDA5CNFSM4FHJJC42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJVHG5I%23issuecomment-577401717&data=02%7C01%7C%7C1c832f7786274b3b98f308d79f84caec%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153264991435497&sdata=Y7u1wWWidcHVKvLvsc99RVgXD%2BqBHLZZ06ucFm%2Fg9to%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAFZEMJAQYYXQVXJTNCJ7TLQ7C5KDANCNFSM4FHJJC4Q&data=02%7C01%7C%7C1c832f7786274b3b98f308d79f84caec%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153264991445502&sdata=kDpAGoESmam4mgD0LDNTm8x5p9qB448BxAwY8%2ByWGDc%3D&reserved=0.
@shubhamrajvanshi and others, this is beacuse latest wordpress uses:
env
ENV PHP_VERSION=7.3.13
I think that you need PHP 7.4 for the caching_sha2_password to work.
See https://github.com/php/php-src/commit/4f06e67ad2201390ed35a9ea6288a00c0b04782b#commitcomment-36593173
It seems that prior to 7.4.2 there were still many bugs in that plugin.
Using https://hub.docker.com/layers/wordpress/library/wordpress/php7.4-fpm-alpine/images/sha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573 with
env
ENV PHP_VERSION=7.4.1
I have no problems with mysql 8.x and caching_sha2_password
I do see this in the log
[Wed Jan 22 21:38:46.387427 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.13 configured -- resuming normal operations
however the point being debated is that the addition of --default-authentication-plugin=mysql_native_password should fix the problem which in our experience it doesn't.
From: Buk Bukowski notifications@github.com
Sent: Wednesday, January 22, 2020 2:47 PM
To: docker-library/wordpress wordpress@noreply.github.com
Cc: siddjain siddjain@live.com; Mention mention@noreply.github.com
Subject: Re: [docker-library/wordpress] Wordpress latest does not works with mysql latest container (#313)
@shubhamrajvanshihttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshubhamrajvanshi&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713817075&sdata=7RP5cbPyI2lqotoPAuQORIXdfoiHStiCCmbfvPmjJww%3D&reserved=0 and others, this is beacuse latest wordpress https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Flatest%2Fimages%2Fsha256-12df7c7f97d9f4c31c2257340cb4f6e84388a9da8d5dff26ec932a9969b3f2b3&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713827086&sdata=tO7WBk61ZUMH0yRSzTVS9b8%2BufldJLyOBQBJU77lY2Q%3D&reserved=0 uses:
ENV PHP_VERSION=7.3.13
I think that you need PHP 7.4 for the caching_sha2_password to work.
See php/php-src@4f06e67#commitcomment-36593173https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fphp%2Fphp-src%2Fcommit%2F4f06e67ad2201390ed35a9ea6288a00c0b04782b%23commitcomment-36593173&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713837098&sdata=VYRX4snaEkbTwI73KEta1wYcA3IrIPbFCgDfHtyS30M%3D&reserved=0
It seems that prior to 7.4.2 there were still many bugs in that plugin.
Using https://hub.docker.com/layers/wordpress/library/wordpress/php7.4-fpm-alpine/images/sha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Fphp7.4-fpm-alpine%2Fimages%2Fsha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713847103&sdata=qxkHK45w6jDu6YiyLbB0uT%2Fem8vvPmDiIsUkaqtoSUo%3D&reserved=0 with
ENV PHP_VERSION=7.4.1
I have no problems with mysql 8.x and caching_sha2_password
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fwordpress%2Fissues%2F313%3Femail_source%3Dnotifications%26email_token%3DAAFZEMLH5QYTTQPONBPSEGTQ7DEJJA5CNFSM4FHJJC42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJVMJAI%23issuecomment-577422465&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713867125&sdata=a%2BfNYy8IQrre4jwq5noahTGJvDVCC9UbR%2B0ga2dauMc%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAFZEMN4AFALR3AAID7S3QTQ7DEJJANCNFSM4FHJJC4Q&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713877142&sdata=V0jjtXhAogqGW%2BBjcteEj6CWkWd1pDULilghOFSOtWY%3D&reserved=0.
you are right btw. we tried wordpress:php7.4-fpm-alpine image and that resolves the error. thanks for sharing it.
From: Buk Bukowski notifications@github.com
Sent: Wednesday, January 22, 2020 2:47 PM
To: docker-library/wordpress wordpress@noreply.github.com
Cc: siddjain siddjain@live.com; Mention mention@noreply.github.com
Subject: Re: [docker-library/wordpress] Wordpress latest does not works with mysql latest container (#313)
@shubhamrajvanshihttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshubhamrajvanshi&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713817075&sdata=7RP5cbPyI2lqotoPAuQORIXdfoiHStiCCmbfvPmjJww%3D&reserved=0 and others, this is beacuse latest wordpress https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Flatest%2Fimages%2Fsha256-12df7c7f97d9f4c31c2257340cb4f6e84388a9da8d5dff26ec932a9969b3f2b3&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713827086&sdata=tO7WBk61ZUMH0yRSzTVS9b8%2BufldJLyOBQBJU77lY2Q%3D&reserved=0 uses:
ENV PHP_VERSION=7.3.13
I think that you need PHP 7.4 for the caching_sha2_password to work.
See php/php-src@4f06e67#commitcomment-36593173https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fphp%2Fphp-src%2Fcommit%2F4f06e67ad2201390ed35a9ea6288a00c0b04782b%23commitcomment-36593173&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713837098&sdata=VYRX4snaEkbTwI73KEta1wYcA3IrIPbFCgDfHtyS30M%3D&reserved=0
It seems that prior to 7.4.2 there were still many bugs in that plugin.
Using https://hub.docker.com/layers/wordpress/library/wordpress/php7.4-fpm-alpine/images/sha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Fphp7.4-fpm-alpine%2Fimages%2Fsha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713847103&sdata=qxkHK45w6jDu6YiyLbB0uT%2Fem8vvPmDiIsUkaqtoSUo%3D&reserved=0 with
ENV PHP_VERSION=7.4.1
I have no problems with mysql 8.x and caching_sha2_password
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fwordpress%2Fissues%2F313%3Femail_source%3Dnotifications%26email_token%3DAAFZEMLH5QYTTQPONBPSEGTQ7DEJJA5CNFSM4FHJJC42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJVMJAI%23issuecomment-577422465&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713867125&sdata=a%2BfNYy8IQrre4jwq5noahTGJvDVCC9UbR%2B0ga2dauMc%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAFZEMN4AFALR3AAID7S3QTQ7DEJJANCNFSM4FHJJC4Q&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713877142&sdata=V0jjtXhAogqGW%2BBjcteEj6CWkWd1pDULilghOFSOtWY%3D&reserved=0.
there is a new error though. first we have 2 containers:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5daadc54aae4 wordpress:php7.4-fpm-alpine "docker-entrypoint.s…" 11 minutes ago Up 11 minutes 9000/tcp, 0.0.0.0:8000->80/tcp wordpress_wordpress_1
0eae5f406c26 mysql:latest "docker-entrypoint.s…" 11 minutes ago Up 11 minutes 3306/tcp, 33060/tcp wordpress_db_1
wordpress_db_1 is running mysql server.
wordpress_wordpress_1 is running WP.
now we see this in wp log
from container: wordpress_wordpress_1
MySQL Connection Error: (1045) Access denied for user 'wordpress'@'X.X.X.X' (using password: YES)
but we verified that one can login to the database as wordpress using the password we have
from container: wordpress_db_1
root@0eae5f406c26:/# mysql -u wordpress -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 8.0.19 MySQL Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
it does not look like a connection problem as otherwise we would have gotten a connection refused error.
From: Buk Bukowski notifications@github.com
Sent: Wednesday, January 22, 2020 2:47 PM
To: docker-library/wordpress wordpress@noreply.github.com
Cc: siddjain siddjain@live.com; Mention mention@noreply.github.com
Subject: Re: [docker-library/wordpress] Wordpress latest does not works with mysql latest container (#313)
@shubhamrajvanshihttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshubhamrajvanshi&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713817075&sdata=7RP5cbPyI2lqotoPAuQORIXdfoiHStiCCmbfvPmjJww%3D&reserved=0 and others, this is beacuse latest wordpress https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Flatest%2Fimages%2Fsha256-12df7c7f97d9f4c31c2257340cb4f6e84388a9da8d5dff26ec932a9969b3f2b3&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713827086&sdata=tO7WBk61ZUMH0yRSzTVS9b8%2BufldJLyOBQBJU77lY2Q%3D&reserved=0 uses:
ENV PHP_VERSION=7.3.13
I think that you need PHP 7.4 for the caching_sha2_password to work.
See php/php-src@4f06e67#commitcomment-36593173https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fphp%2Fphp-src%2Fcommit%2F4f06e67ad2201390ed35a9ea6288a00c0b04782b%23commitcomment-36593173&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713837098&sdata=VYRX4snaEkbTwI73KEta1wYcA3IrIPbFCgDfHtyS30M%3D&reserved=0
It seems that prior to 7.4.2 there were still many bugs in that plugin.
Using https://hub.docker.com/layers/wordpress/library/wordpress/php7.4-fpm-alpine/images/sha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Flayers%2Fwordpress%2Flibrary%2Fwordpress%2Fphp7.4-fpm-alpine%2Fimages%2Fsha256-0d48cbecd225d5ea6098daa6fa0c4e218fc90b87358ffc0ccd72cbc4b2bc0573&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713847103&sdata=qxkHK45w6jDu6YiyLbB0uT%2Fem8vvPmDiIsUkaqtoSUo%3D&reserved=0 with
ENV PHP_VERSION=7.4.1
I have no problems with mysql 8.x and caching_sha2_password
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fwordpress%2Fissues%2F313%3Femail_source%3Dnotifications%26email_token%3DAAFZEMLH5QYTTQPONBPSEGTQ7DEJJA5CNFSM4FHJJC42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJVMJAI%23issuecomment-577422465&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713867125&sdata=a%2BfNYy8IQrre4jwq5noahTGJvDVCC9UbR%2B0ga2dauMc%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAFZEMN4AFALR3AAID7S3QTQ7DEJJANCNFSM4FHJJC4Q&data=02%7C01%7C%7C16aa07d76f6f4688306808d79f8d1c01%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153300713877142&sdata=V0jjtXhAogqGW%2BBjcteEj6CWkWd1pDULilghOFSOtWY%3D&reserved=0.
ping... anyone?
[01-Feb-2020 01:08:17 UTC] PHP Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'wordpress'@'X.X.X.X' (using password: YES) in Standard input code on line 22
$ docker exec -it wordpress_wordpress_1 /bin/bash
bash-5.0# env
HOSTNAME=87d23ac7a5ba
PHP_VERSION=7.4.1
PHP_MD5=
PHP_INI_DIR=/usr/local/etc/php
WORDPRESS_VERSION=5.3.2
GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312
PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie
PWD=/var/www/html
HOME=/root
WORDPRESS_SHA1=fded476f112dbab14e3b5acddd2bcfa550e7b01b
PHP_SHA256=561bb866bdd509094be00f4ece7c3543ec971c4d878645ee81437e291cffc762
WORDPRESS_DB_HOST=db:3306
PHPIZE_DEPS=autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c
TERM=xterm
PHP_URL=https://www.php.net/get/php-7.4.1.tar.xz/from/this/mirror
PHP_EXTRA_CONFIGURE_ARGS=--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
SHLVL=1
PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
WORDPRESS_DB_USER=wordpress
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WORDPRESS_DB_PASSWORD_FILE=/run/secrets/db_password
PHP_ASC_URL=https://www.php.net/get/php-7.4.1.tar.xz.asc/from/this/mirror
PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
_=/usr/bin/env
@siddjain these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow
Most helpful comment
You just add it to the command (after the image on a docker run). Here is a docker compose: