Skip to content

Instantly share code, notes, and snippets.

View k2tzumi's full-sized avatar
🚴‍♂️

Katsumi Kato k2tzumi

🚴‍♂️
View GitHub Profile
@pda
pda / docker-mysql-initialize.sh
Created March 21, 2014 22:09
Docker script to initialize MySQL database; auth from remote hosts.
#!/bin/bash
# Initialize MySQL database.
# ADD this file into the container via Dockerfile.
# Assuming you specify a VOLUME ["/var/lib/mysql"] or `-v /var/lib/mysql` on the `docker run` command…
# Once built, do e.g. `docker run your_image /path/to/docker-mysql-initialize.sh`
# Again, make sure MySQL is persisting data outside the container for this to have any effect.
set -e
set -x