Docker installation and use of hello word

Introduction: Install yum -y install docker-io Start docker service docker start Close docker service docker stop View version docker version View information docker info Note that docker can only run commands under the root user by default, but you can add users to the docker group, Is the user has the docker command permission, the command such as
Install
yum -y install docker-io

【Docker installation and use of hello word】start docker


service docker start
close docker
service docker stop
View version
docker version
View information
docker info
Note that docker can only run commands under the root user by default, but users can be added to the docker group. The user has the docker command permission. The command is as follows
gpasswd -a lhy docker

【Docker installation and use of hello word】query mirror


docker search hello-word
Download mirror
docker pull docker.io/abenchi/hello-docker
View all mirrors
docker images
run image
docker run image IMAGE ID
Output: hello world 2nd try





Copyright statement: The content of this article is contributed by Alibaba Cloud's real-name registered users. The copyright belongs to the original author. The Alibaba Cloud developer community does not own the copyright and does not assume the corresponding legal responsibility. For specific rules, please refer to the " Alibaba Cloud Developer Community User Service Agreement " and " Alibaba Cloud Developer Community Intellectual Property Protection Guidelines ". If you find any content suspected of plagiarism in this community, fill out the infringement complaint form to report it. Once verified, this community will delete the allegedly infringing content immediately.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00