Last active
July 25, 2017 15:01
-
-
Save nicholasodonnell/be0ea7a15dd40582902dd533ede8036e to your computer and use it in GitHub Desktop.
Fixes database taking forever to import problem on Dockerized MySQL (Mac)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd ~/Library/Containers/com.docker.docker/Data/database | |
git reset --hard | |
mkdir -p ./com.docker.driver.amd64-linux/disk | |
touch ./com.docker.driver.amd64-linux/disk/full-sync-on-flush | |
touch ./com.docker.driver.amd64-linux/disk/on-flush | |
echo -n "Current full-sync-on-flush setting: " | |
cat ./com.docker.driver.amd64-linux/disk/full-sync-on-flush | |
echo | |
echo -n "Current on-flush setting: " | |
cat ./com.docker.driver.amd64-linux/disk/on-flush | |
echo | |
echo -n false > ./com.docker.driver.amd64-linux/disk/full-sync-on-flush | |
echo -n none > ./com.docker.driver.amd64-linux/disk/on-flush | |
git add ./com.docker.driver.amd64-linux/disk/full-sync-on-flush | |
git add ./com.docker.driver.amd64-linux/disk/on-flush | |
git commit -s -m "disable flushing" | |
echo "Docker should restart by itself now." | |
osascript -e 'quit app "Docker"' | |
open -a Docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment