- Product Bulletin
- Service Overview
-
User Guide
- Usage Overview
- Selecting HCE as the Public Image When Creating an ECS
- Changing an OS to HCE
- Migrating an OS
- Upgrading HCE and RPM Packages
- Security Updates for HCE
- Obtaining the openEuler Extended Software Packages
- Creating a Docker Image and Starting a Container
- Tools
- Kernel Functions and Interfaces
- xGPU
- Configuring the Repositories and Installing Software for HCE
-
FAQs
- What Do I Do If CentOS Linux Is No Longer Maintained?
- Does Huawei Cloud Have a Migration Solution for CentOS?
- How Do I Install the MLNX Driver?
- How Do I Enable SELinux on an ECS Running HCE?
- How Do I Change the OS Name on the Console After the OS Is Migrated?
- How Are Huawei Cloud EulerOS, EulerOS, and openEuler Different from One Another?
- How Do I Enable WireGuard in Kernel and Install wireguard-tools?
- How Do I Save the User Credential Information for Logging In to Docker Like What Docker CE Does?
- What Is OOM? Why Does OOM Occur?
- How Do I Handle IPVS Errors?
- Why Can't HCE Obtain an IPv6 Address After IPv6 Is Enabled for an ECS?
- How Do I Set Auto Log Using TMOUT?
- Best Practices
- General Reference
Show all
Copied.
Installing Docker
Introduction
Docker is an open-source application container engine that features portability, scalability, high security, and manageability. Developers can package applications and dependencies into portable containers, quickly release them to Linux servers, and use the OS-level virtualization to build, deploy, and manage applications more efficiently. This tutorial describes how you install Docker in HCE 2.0.
Preparations
Prepare an ECS.
Procedure
- Install Docker.
- Run the following command to install Docker:
dnf install docker
- Run the following command to start Docker:
systemctl start docker
- Run the following command to install Docker:
- Verify that Docker is installed.
- Use Docker.
- Manage the Docker daemon.
- Run the daemon.
systemctl start docker
- Stop the daemon.
systemctl stop docker
- Restart the daemon.
systemctl restart docker
- Manage the images.
- Edit the label.
docker tag hello-world:latest hello-world:v1
- View existing images.
docker images
- Forcibly delete an image.
docker rmi -f hello-world:v1
- Manage containers.
- Enter a container.
docker run -it ImageId /bin/bash
- Exit a container.
exit
- Access a container running in the backend.
docker exec -it <Container ID> /bin/bash
- Create an image from a container.
docker commit <Container ID> [<Repository name>[:<Label>]]
Example command:
docker commit 135****9f757 hello-world:v1
CAUTION:
Docker 18.09.0 is installed. To install a later version, see Docker Documentation.
- Manage the Docker daemon.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot