Skip to content
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

Docker Compose mysql password requires quoting #18756

Open
lthurlow opened this issue Apr 14, 2024 · 0 comments
Open

Docker Compose mysql password requires quoting #18756

lthurlow opened this issue Apr 14, 2024 · 0 comments

Comments

@lthurlow
Copy link

Current Behaviour

If a mysql password contains a characters that can be interrupted the shell is happy to do so. !;& , etc.

This will cause docker compose up to fail with ac-database being unhealthy because the test command fails by expanding the password.

Expected Blizzlike Behaviour

The password that gets loaded into docker compose needs to be quoted to prevent the shell from interpreting.

Source

https://github.com/azerothcore/azerothcore-wotlk/blob/master/docker-compose.yml#L25

Steps to reproduce the problem

  1. Set MYSQL_ROOT_PASSWORD with a password that can be interpreted by shell: My password is &secure ! Hope?;
  2. Build containers (docker compose build)
  3. Run containers (docker compose --env-file .envs up -d where .envs contains the environment variable or MYSQL_ROOT_PASSWORD="My password is &secure ! Hope?;" docker compose up -d)
  4. Run fails after timeout because test command continues to exit with non-zero due to password being interpreted.

Extra Notes

test: "/usr/bin/mysql --user=root --password=\"$${MYSQL_ROOT_PASSWORD}\" --execute \"SHOW DATABASES;\""

AC rev. hash/commit

c8abb8c

Operating system

Debian 11

Custom changes or Modules

N/A

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

No branches or pull requests

1 participant