我要评分
获取效率
正确性
完整性
易理解

Building Description

Docker uses Dockerfile to build Docker images. Dockerfile is a text file that contains instructions and description required for building Docker images.

This document describes how to build a MySQL Docker image by modifying the official Dockerfile, which uses the CentOS image centos:centos8.2.2004 from Docker Hub as the basis and package-based MySQL 8 installation as an example.

  • If you do not have the permission to access the Internet, configure a network proxy.
  • Image construction requires only the Docker environment. Therefore, Docker images can be constructed on the K8s node or other Kunpeng hosts where Docker is installed. After an image is constructed, run the docker save command to export the image file. Then, use an SFTP tool to copy the image file to the node required by K8s. Finally, run the docker load command on the node to import the image.
  • If an image needs to be built on a K8s node and the proxy environment variables such as http_proxy are configured, you need to delete these variables after the image is built. Otherwise, these variables may interfere with K8s components and cause communication failures.