This is an example of how to create a Docker image that comes preloaded with some custom data.
-
Create your custom script and place it in the
setup.sql
file. -
Build the image.
docker build -t preloadedmysql:latest .
- [optional] After the build, start a container.
docker-compose up -d
Done!
If you want, you can change the image name from preloadedmysql
to something else.
This repo is part of a post from my site: https://raccoon.ninja