Docker command quick query

Source: Internet
Author: User

Docker command quick query

Basic syntax
Docker [OPTIONS] COMMAND [arg...] Option
-D = true | false
Use the debug mode. The default value is false.

-H, -- host = [unix: // var/run/docker. sock]: tcp: // [host: port] to bind or use unix: // [/path/to/socket.
The socket bound in daemon mode uses one or more tcp: // host: port, unix: // path/to/socket, fd: // * or fd: // socketfd to specify.

-- Api-enable-cors = true | false
Enable CORS headers in the Remote API. The default value is false.

-B = ""
Mount the container to an existing bridge. If 'none' is specified, the network of the container is disabled.

-- Bip = ""
Let the dynamically created docker0 use the given CIDR address; it is mutually exclusive with the-B option.

-D = true | false
Use the daemon mode. The default value is false.

-- Dns = ""
Let Docker use the given DNS server.

-G = ""
Specifies the root path of the Docker runtime. The default value is/var/lib/docker.

-- Icc = true | false
Enable inter-container communication. The default value is true.

-- Ip = ""
The default IP address used to bind a port. The default value is 0.0.0.0.

-- Iptables = true | false
Disable Docker from adding iptables rules. The default value is true.

-- Mtu = VALUE
Specifies the mtu of the container network. The default value is 1500.

-P = ""
Specifies the daemon PID file path. The default value is/var/run/docker. pid.

-S = ""
Forces Docker to use the given storage driver when running.

-V = true | false
Output the version information and exit. The default value is false.

-- Selinux-enabled = true | false
Enable SELinux support. The default value is false. SELinux currently does not support the BTRFS storage driver.
Command
Docker commands can be executed using docker-CMD or docker CMD. The two are the same.

Docker-attach (1)
Attach to a running container.

Docker-build (1)
Create an image from a Dockerfile

Docker-commit (1)
Create a new image from the modification of a container

Docker-cp (1)
Copy the file from the container to the host system

Docker-diff (1)
Check the modification of a container File System

Docker-events (1)
Obtain real-time events from the server

Docker-export (1)
Export the container content as a tar package

Docker-history (1)
Displays the history of an image.

Docker-images (1)
List existing images

Docker-import (1)
Import a tar package to create an image

Docker-info (1)
Displays related system information.

Docker-inspect (1)
Displays the underlying details of a container.

Docker-kill (1)
Close a running container (including processes and all resources)

Docker-load (1)
Load an image from a tar package

Docker-login (1)
Register or log on to a Docker repository Server

Docker-logout (1)
Log out from the Docker repository Server

Docker-logs (1)
Obtains the log information of a container.

Docker-pause (1)
Pause all processes in a container

Docker-port (1)
Find a public port from nat to a private network port

Docker-ps (1)
List containers

Docker-pull (1)
Drop down an image or warehouse from a Docker registration server

Docker-push (1)
Push an image or repository to a Docker registration server

Docker-restart (1)
Restart a running container

Docker-rm (1)
Deletes a specified number of containers.

Docker-rmi (1)
Deletes a specified number of images.

Docker-run (1)
Create a new container and run the given command

Docker-save (1)
Save an image as a tar package file

Docker-search (1)
Search for an image in Docker index

Docker-start (1)
Start a container

Docker-stop (1)
Terminate a running container

Docker-tag (1)
Tag an image

Docker-top (1)
View the running process information in a container

Docker-unpause (1)
Restores all processes in a container from the paused state.

Docker-version (1)
Output Docker version information

Docker-wait (1)
Blocking until a container is terminated, and then output its exit character

Install Docker in CentOS 6/7 Series

Detailed explanation of the entire process of building Gitlab CI for Docker

Docker installation application (CentOS 6.5_x64)

What is the difference between Docker and a normal Virtual Machine?

Use MySQL in Docker

Docker will change everything

Docker installation application (CentOS 6.5_x64)

Docker details: click here
Docker: click here

This article permanently updates the link address:

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.