Preparing the Official Dockerfile of MySQL
You can download the official Dockerfile of MySQL in either of the following methods:
- Method 1: Using a browser
Visit https://github.com/mysql/mysql-docker.git using the Google Chrome browser.
Click Code and choose Download ZIP from the drop-down list. By default, the mysql-server file of the main branch is downloaded.

After the download is complete, upload the mysql-docker-mysql-server.zip package to the server.
1 2 3
unzip ./mysql-docker-mysql-server.zip mv mysql-docker-mysql-server mysql-docker ls mysql-docker
- Method 2: Using the command line interface (CLI)
On the Docker image construction server, run the following commands to clone the mysql-docker repository (mysql-server is the main branch by default):
1 2 3
git config --global http.sslVerify false git clone https://github.com/mysql/mysql-docker.git ls mysql-docker
Parent topic: Constructing a MySQL Docker Image