Rate This Document
Findability
Accuracy
Completeness
Readability

Creating a Docker Image for the Kunpeng Architecture

The following describes how to use the docker commit command to create a Docker image. The httpd service 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 is installed with HTTPd service and can run on a Kunpeng server. Run the docker commit command to export it as an image.
    1
    docker commit -m "Commit message"  -a "Author" CONTAINER REPOSITORY[:TAG]
    

    A Docker image with the HTTPd service is created.