Rate This Document
Findability
Accuracy
Completeness
Readability

Creating a Docker Image for the Kunpeng Architecture

The following describe how to use the docker commit command to create a Docker image. HTTPd is used as an example.

Prerequisites

The Docker service is running on the host based on the Kunpeng architecture.

Procedure

  1. Start a Docker container of CentOS.
    1
    docker run -itd -p 5000:80 --name xx --privileged centos:latest init
    
  2. Access the container.
    1
    docker exec -it xx /bin/bash
    
  3. Install the HTTPd service.
    1
    yum -y install httpd.aarch64
    
  4. Start the HTTPd service.
    1
    2
    systemctl enable httpd
    systemctl start httpd
    
  5. The container is a CentOS container that has HTTPd service installed. Run the docker commit command to import it as an image.
    1
    docker commit -m "message" -a "author" <container ID> <image name>:<tag>
    

    A Docker image with the HTTPd service is created.