Docker installation, use

Source: Internet
Author: User

1: Install: 80936757

Sudo apt-Get install docker. Io

2: Use docker to create a container, such as creating an operating system https://www.cnblogs.com/ivictor/p/4834864.html inside the container

Sudo docker run-it-V/home/liyafei/myfile:/myfile-P 9000: 9002 Ubuntu: 14.04/bin/bash

-V: Local folder of the operating system in the container to form a corresponding relationship

-P local port: port of the container Operating System

3: Submit

Docker commit 6851e61bbf29 Version1 # submit and generate an image

Save the container. For example, save Version1 as version1.tar.

Sudo docker save-O version1.tar Version1

4: loading image https://www.cnblogs.com/ksir16/p/6553851.html

docker load -i version1.tar

5. Execute the image

Sudo docker run-t-I Version1/bin/bash

Sudo docker run-T-V/home/liyafei/myfile:/myfile-I Version1/bin/bash // execution with directory ing

 

Docker installation, use

Related Article

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.