Skip to content

Commit d51e65b

Browse files
committed
Build/Test Tools: Always use the amd64 images for MariaDB and MySQL on the local development environment.
The `amd64/mysql` and `amd64/mariadb` official images from Docker are also compatible with an x64 host machine which means they can be used by default instead of only when the host uses ARM64. Props bernhard-reiter, czapla, gmovr, withinboredom Fixes #56528 git-svn-id: https://develop.svn.wordpress.org/trunk@54096 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e0e7d10 commit d51e65b

5 files changed

Lines changed: 3 additions & 15 deletions

File tree

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ LOCAL_DB_TYPE=mysql
4848
#
4949
# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
5050
#
51-
# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions.
52-
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
51+
# When using `mysql`, see https://hub.docker.com/r/amd64/mysql for valid versions.
52+
# When using `mariadb`, see https://hub.docker.com/r/amd64/mariadb for valid versions.
5353
##
5454
LOCAL_DB_VERSION=5.7
5555

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ services:
6565
# The MySQL container.
6666
##
6767
mysql:
68-
image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
68+
image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
6969

7070
networks:
7171
- wpdevnet

tools/local-env/scripts/docker.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@ const { execSync } = require( 'child_process' );
44

55
dotenvExpand.expand( dotenv.config() );
66

7-
if ( process.arch === 'arm64' ) {
8-
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
9-
}
10-
117
// Execute any docker-compose command passed to this script.
128
execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );

tools/local-env/scripts/install.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ const { renameSync, readFileSync, writeFileSync } = require( 'fs' );
66

77
dotenvExpand.expand( dotenv.config() );
88

9-
if ( process.arch === 'arm64' ) {
10-
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
11-
}
12-
139
// Create wp-config.php.
1410
wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --path=/var/www/src --force' );
1511

tools/local-env/scripts/start.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ const { execSync } = require( 'child_process' );
44

55
dotenvExpand.expand( dotenv.config() );
66

7-
if ( process.arch === 'arm64' ) {
8-
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
9-
}
10-
117
// Start the local-env containers.
128
const containers = ( process.env.LOCAL_PHP_MEMCACHED === 'true' )
139
? 'wordpress-develop memcached'

0 commit comments

Comments
 (0)