Summary of common docker entry-level commands and common docker entry-level commands

Source: Internet
Author: User
Tags docker ps

Summary of common docker entry-level commands and common docker entry-level commands

1. View version information

Docker version

2. Search for images (images are generally stored by user name/image name, except for some special basic images)

Docker search imageName

3. Download the image (Basic images can be retrieved and downloaded directly using the image name)

Docker pull imageName

4. Run

Docker run [options] imageName [command] [arg]

5. Install new programs in the container

Docker run imageName apt-get install-y programName

6. Save the changes to the container

(1) docker ps-l get the container id after the new command is installed

(2) docker commit oldImageId newImageName (the id of the new image will be returned)

7. Run the new container

Docker run [options] newImageName [command] [arg]

8. view the running Image

Docker ps

9. view the details of a container

Docker inspect imageId

10. list all installed Images

Docker images

11. Publish the image to the official website (this is not very familiar with, first provide commands)

Docker push imageName

Note: Only images can be published to your own space.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.