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

Add support for DDEV #16

Merged
merged 2 commits into from
May 27, 2021
Merged

Add support for DDEV #16

merged 2 commits into from
May 27, 2021

Conversation

hussainweb
Copy link
Member

@hussainweb hussainweb commented May 18, 2021

This fixes #15 but with a few workarounds. The change here needs to repeat a few steps from the base image because we are recreating the /mysqlbase directory contents. This also increases the image size but there is no good way around this. More details in #15.

The create_init_db.sh script is copied from DDEV's create_base_db.sh with only these changes inserted into the middle of the file (just before mariabackup is run:

set +u
source /usr/local/bin/docker-entrypoint.sh
docker_process_init_files /docker-entrypoint-initdb.d/*
set -u

It needs to call set +u to disable unset variable checks. MariaDB's docker-entrypoint.sh does not reliably check for this in the docker_process_sql function resulting in an error because of $1.

/usr/local/bin/docker-entrypoint.sh: line 197: $1: unbound variable

Rather than fixing the error, it's simpler to just disable the check. This may not be a long-term fix but works now and hopefully a better solution exists which can be used upstream in DDEV.

@hussainweb hussainweb merged commit e28a082 into master May 27, 2021
@hussainweb hussainweb deleted the ddev-support branch May 27, 2021 00:24
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.

Add support for DDEV
1 participant