Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@weitzman
Last active July 19, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weitzman/7f6afe26f6adc6863fd8e4bd17c3c6d2 to your computer and use it in GitHub Desktop.
Save weitzman/7f6afe26f6adc6863fd8e4bd17c3c6d2 to your computer and use it in GitHub Desktop.
# Builds a MySQL image with local data directory. See 'command' in docker-compose.yml
# Approach borrowed from https://about.zoosk.com/en/engineering-blog/test-databases-docker-containers/.
FROM mysql:5.6
RUN ["mkdir", "–p", "/var/lib/mysql-image"]
RUN echo "[mysqld]" > /etc/mysql/conf.d/mass-vm.cnf \
&& echo "datadir = /var/lib/mysql-image" >> /etc/mysql/conf.d/mass-vm.cnf
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment