Build your own Docker base image

Source: Internet
Author: User

Environment Introduction RHEL6.6 Docker1.7

1, mount the relevant operating system ISO image to/mnt

mkdir ~/dockerbase &&CD Dockerbase

(Note: Centos7/rhel7 no relevant febootstrap software)

Febootstrap-i iputils-i vim-common-i openssh-server-i yum-i passwd-i wget-i git-i telnet rhel redhat file:///mnt/

2, CD redhat/

3, Package image

Tar-c. | Docker Import rhel67

4. View the generated image ID

Docker images

5, Save image

Docker Save Ff4ede139a35 >/tmp/rhel67.tar

Copy and paste the finished image to another virtual machine (environment: REHL7.2 Docker1.12)

1, copy

SCP 10.0.0.66:/tmp/rhel67.tar.

2, load photographed like

Docker Load < Rhel67.tar

3. View the loaded image ID

Docker images

4, label the image to distinguish other images

Docker tag ID rhel67:latest

5, see the Tagged Image

Docker images

6, creating the container

D run-it--name mytest rhel67 Bash


This article is from the "Moon Dream" blog, please be sure to keep this source http://onlywyn.blog.51cto.com/204565/1884133

Build your own 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.