How to create your own basic image in docker

Source: Internet
Author: User
1. Local Image

For example, you can package your development environment with the name centos6-base.tar. then, you can use centos6-base.tar as the benchmark image in docker.

 

1. Create your own image and place it in the/root directory:

 

  1. # Tar -- Numeric-owner -- exclude =/proc -- exclude =/sys-CVF centos6-base.tar/

For example, only the files (.tar, .tar.gz,. tgz,. bzip,. Tar. xz, or. txz) are supported.

2. Import the produced centos and command: centos6-base:
  1. # Cat centos6-base.tar | docker import-centos6-base
3. Now you can run it (test to view the kernel ):
  1. # Docker run-I-t centos6-base CAT/etc/RedHat-release
Ii. Local directory

If you put centos-base.tar in the/OPT directory, this command can be (unverified ):

$ Sudo tar-C. | docker import-/OPT
Ii. Remote Image
  1. Simple operation:
$ Sudo docker import http://example.com/exampleimage.tgz

 

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.