A powerful database server running on the best OS and the best container system in the world.
2.8K
A powerful database server running on the best OS and the best container system in the world.
This image is built on ghifari160/ubuntu, which comes with more useful packages than the official image have to offer. Also, this image is designed with data persistence in mind. If no metadata is found, the powerful init script will initialize the MySQL installation and store metadata files. Redeployed containers would skip the initialization phase and immediately run the MySQL daemon.
By default, this image should be run as a daemon
docker run -d -e MYSQL_ROOT_PASSWORD=password ghifari160/mysql
However, this image can be run in the foreground for debug purposes
docker run -it -e MYSQL_ROOT_PASSWORD=password ghifari160/mysql
You must set the MYSQL_ROOT_PASSWORD environment
variable.
Use the parameter --name=<name> to name the container. Example:
docker run --name=mysql -d -e MYSQL_ROOT_PASSWORD=password ghifari160/mysql
Use the parameter -v /path/on/the/host/computer:/var/lib/mysql to set the
container's MySQL data directory. Example:
docker run -d -v /d/workspace/project:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password ghifari160/mysql
Use the parameter -p <port on the host>:3306 to map the container's port to
another port on the host computer. Example:
docker run -d -p 5000:3306 -e MYSQL_ROOT_PASSWORD=password ghifari160/mysql
The init script will set the password of the root user to be the value of
MYSQL_ROOT_PASSWORD environment variable. Use the parameter
-e MYSQL_ROOT_PASSWORD=<password> to set the password of the root user.
Example:
docker run -d -e MYSQL_ROOT_PASSWORD=password123 ghifari160/mysql
On macOS, shared volumes remains owned by the host user and group. Permissions
on these shared volumes are also determined by the host, unchangeable from
guest. On the home directory, the default owner and permission are
<user>:staff and 755. MySQL needs write access to its files and
directories. A workaround is to set the mysql UID and GID to 1000 and
50. The init script will do this if the value of G16_MACOS is yes. Use
the parameter -e G16_MACOS=yes to enable this workaround. Example:
docker run -d -e MYSQL_ROOT_PASSWORD=password -e G16_MACOS=yes ghifari160/mysql
Content type
Image
Digest
Size
126.5 MB
Last updated
about 7 years ago
docker pull ghifari160/mysql