This will build a Docker image for MySQL.
- Configuration tweaked to use all around settings for general usage - Can be changed
- Can use official Mysql environment variables (MYSQL_USER, MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD)
- Allows for automatically creating multiple databases on container initialization
- About
- Maintainer
- Table of Contents
- Installation
- Configuration
- Maintenance
- Support
- License
- References
-
Download Docker Desktop for Mac or Windows. Docker Compose will be automatically installed. On Linux, make sure you have the latest version of Docker and Docker Compose.
-
Clone this repository
docker-compose up -d- The quickest way to get started is using docker-compose. See the example compose file.
- Set various environment variables to understand the capabilities of this image.
- Map persistent storage for access to configuration, data files and logs.
- Make networking ports available for public access if necessary
The following directories are used for configuration and can be mapped for persistent storage.
| Directory | Description |
|---|---|
/var/lib/mysql |
MySQL Data Directory |
/etc/mysql/conf.d |
Optional directory to put .cnf files for additional directives |
/var/log/mysql |
Logs directory |
Optional directory to put .cnf files for additional directives
| Parameter | Description | Default |
|---|---|---|
TZ |
Local time zone | America/Mexico_City |
The following ports are exposed.
| Port | Description |
|---|---|
3306 |
MySQL Server |
For debugging and maintenance purposes you may want access the containers shell.
docker exec -it (whatever your container name is) bashThese images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.
- The Discussions board is a great place for working with the community on tips and tricks of using this image.
- Consider sponsoring me personalized support.
- Please, submit a Bug Report if something isn't working as expected. I'll do my best to issue a fix in short order.
- Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
- Consider sponsoring me regarding development of features.
- Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
MIT. See LICENSE for more details.