Docker Learning Notes (ii)--docker deployment Configuration and Common directives introduction

Source: Internet
Author: User
Tags docker ps docker run
Docker Deployment Installation

Ubuntu:apt-get Install Docker
Centos:yum Install Docker Setup boot up Docker daemon process

Systemctl Start Docker.service
Systemctl Enable Docker.service view Docker process status

Systemctl grep Docker View Docker information

Docker info

Docker version

See the client version, server version and many more to see the Docker Virtual Bridge

IP addr
view Ubuntu Under the Docker configuration file

Cat/etc/default/docker
Docker basic Commands

Find available Images: Docker search ImageName

Get Image: Docker pull imageName, get the latest version by default (latest)

You can see the idea of Docker tiered shared resources
Docker images view local existing mirrors

Docker run [options] image[:tag] [command] [arg ...] To start a mirrored resource
Parameters:

-it run in interactive mode, such as shell scripts
-d=true or-D containers will run in background mode
exec enters the container, or attach the session to reconnect the container
–cidfile= "If Docker has an automated requirement, you can export the Containerid to the specified file (pidfile)
Privileged Docker containers do not have privileges, such as the inability to start a container in a container. This is because the container is not able to access any other devices by default. With privileged, the container has access to any other device.
Here's a concept, the command inside Docker run is over, container is over, like when we start a container view of Java, and the command java-version runs successfully, container ends. container life cycle related directives

Docker Create/start/stop/pause/unpause ContainerName
Create start stop pause Cancel Pause

Docker PS Viewing a running container

Docker ps-a View all local containers (running and stop execution)

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.