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
- Start a Docker container of CentOS.
1docker run -itd -p 5000:80 --name xx --privileged centos:latest init
- Access the container.
1docker exec -it xx /bin/bash
- Install the HTTPd service.
1yum -y install httpd.aarch64
- Start the HTTPd service.
1 2
systemctl enable httpd systemctl start httpd
- 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.
1docker commit -m "Commit message" -a "Author" CONTAINER REPOSITORY[:TAG]
A Docker image with the HTTPd service is created.
Parent topic: More Information