Ubuntu16 creating a docker base image

Source: Internet
Author: User
Tags docker hub docker run

When you create a mirror through dockerfile, it is generally based on the official image provided by the Docker Hub. The following describes how to create a personal private base image on a ubuntu16 system .

1, install bootstrap tool Debootstrap

$ sudo apt-get insall debootstrap-y



2. Download ubuntuxenial (16.04) binaries using debootstrap



3. Create a base image using the Docker Import command
1) Import the image under the Xenial directory

# tar-c Trust-c. The command is used to compress the contents of the Xenial directory into a single file and output to stdout. by | (pipeline) to pass output content to the Docker Import command.  $ sudo tar-c xenial-c. | sudo docker import-xenial

2) Import files on the network

$ sudo docker import http://test.com/trust.tgz xenial

4. Output image

$ docker Images


5. Run Image xenial

$ docker run-i-T--name Hello Xenial/bin/bash



Ubuntu16 creating a docker base image

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.