Skip to content

Commit

Permalink
Build/Test Tools: Properly escape $ characters in Docker compose file.
Browse files Browse the repository at this point in the history
This fixes an invalid interpolation format error that can be encountered in the `mysql` container’s healthcheck test command.

Follow up to [59484].

Props afercia.
See #62221.

git-svn-id: https://develop.svn.wordpress.org/trunk@59489 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Dec 5, 2024
1 parent b67c76e commit e585c95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:
command: ${LOCAL_DB_AUTH_OPTION-}

healthcheck:
test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $?;; *) mariadb-admin ping -h localhost || exit $?;; esac; else mysqladmin ping -h localhost || exit $?; fi" ]
test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $$?;; *) mariadb-admin ping -h localhost || exit $$?;; esac; else mysqladmin ping -h localhost || exit $$?; fi" ]
timeout: 5s
interval: 5s
retries: 10
Expand Down

0 comments on commit e585c95

Please sign in to comment.