Daily Docker practices under Linux

Source: Internet
Author: User

1.Linux has developed another virtualization technology: Linux container (Linux Containers, abbreviated as LXC)

The 2.Linux container is not simulating a complete operating system, but rather isolating the process

3.Docker is a package of Linux containers that provides an easy-to-use interface for containers

4.Docker is the server----client architecture. The Docker service is required when the command line runs the Docker command

Curl-ssl https://get.docker.com/| Sh

Service Docker start

5.Docker the application and its dependencies, packaged in the image file

6. The container instance, itself is also a file, called the container file

Docker image Pull name//extract image file

Docker image ls//Lists all image

Docker image RM [ImageName]//delete image file

Docker container Run Hello-world//Run image file

Docker container start [containid]//running a container that already exists

Docker container kill [Containid]//Terminate container

Docker container LS--all//Lists all containers, including terminated

Docker container RM [containid]//Delete Container

Hello-world:

1.docker Run Hello-world

2. No image will automatically pull the image and then run

Run Ubuntu in the Ubuntu Docker

1.docker container run-p 6666:80-it dc86b7b90238 Bash//port map outside of 6666 to inside 80

2.docker container exec-it 3ce8952ce68d Bash//execute commands in a running container,-I

Run CentOS in the Ubuntu Docker

1.docker Pull Centos:6

2. Map the local port to the running container

1) Docker commit 6e54eac36507 centos_image1//commits the container in the run as a mirror

2) Docker run-d-it-p 6667:80 centos_image1/bin/bash//New image from Run

Daily Docker practices under Linux

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.