Step 1(Pull Image from docker hub)
docker pull bajwalabs/mysql:8.0.28
Step 2(Setup environment variables)
Create an environment variables file. e.g. env.list
Put below variables in this file.
MYSQL_ROOT_PASSWORD=A Strong Password
Step 3(Run Container)
docker run --env-file env.list --volume mysql_volume:/var/lib/mysql --name mysql8.0.28 -it -p 3306:3306 bajwalabs/mysql:8.0.28
Note:The above command will not remove Container when Stopped as --rm argument is not used.
Step 4(Stop Container)
docker stop mysql8.0.28
Note:Use another console to run above command
Step 5(Start the stopped Container)
docker start mysql8.0.28
Step 6(Connect to Mysql Container)
Once container is running, you may connect using below information.
Mysql User: root
Password: Password in env.list file.
Host: localhost
Port: 3306
Content type
Image
Digest
Size
146.9 MB
Last updated
over 4 years ago
docker pull bajwalabs/mysql