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
- 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 has HTTPd service installed. Run the docker commit command to import it as an image.
1docker commit -m "message" -a "author" <container ID> <image name>:<tag>
A Docker image with the HTTPd service is created.
Parent topic: More Information