Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Docker commonly used commands Description     - SSH keys using login and password to log prohibited practice (Linux)

- How to find the available network adapter on Ubuntu (Linux)

- Ubuntu install Eclipse for C / C ++ and related configuration (Linux)

- Shell script to delete empty folders recursively (Linux)

- To install the Contiki development toolchain on Ubuntu (Linux)

- Use 3G wireless network card under Linux (Linux)

- Linux kernel source code analysis (Linux)

- Linux system package manager -RPM (Linux)

- Installation JDK1.7 under Ubuntu14.04 64-bit (Linux)

- How to install and configure in Ubuntu 14.10 'Weather Information Indicator' (Linux)

- Using the Android interface in Parcelable (Programming)

- Character Encoding notes: ASCII, Unicode and UTF-8 (Linux)

- Depth understanding of DB2 table space (Tablespace) (Database)

- Django1.5 Custom User Model (Programming)

- To install Internet security firewall Raiders (Linux)

- Java in the final qualifier (Programming)

- How to set up FTP server on Linux (Server)

- Install Redis 2.6 5.5 32 position CentOS error resolved (Linux)

- How to use SHA256 checksum files download (Linux)

- Use the dd command to the hard disk I / O performance test (Linux)

 
         
  Docker commonly used commands Description
     
  Add Date : 2016-10-17      
         
       
         
  1, The daemon container and container how to interact, because seemingly used directly daemon type containers docker attache command directly die there, and shell command does not appear the container line, it is necessary to adopt the following ways:

The first step: the first container query, use the command: docker ps, following results were obtained:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

a40c6e58afbd mysql: 5.7 "/entrypoint.sh mysq 15 hours ago Up 15 hours 0.0.0.0:3306->3306/tcp db001

512013f5bd3a csphere / csphere: 0.11.2 "/ bin / csphere-init - 10 days ago Up 9 hours csphere-agent

631a4f91b2fb csphere / csphere: 0.11.2 "/ bin / csphere-init - 10 days ago Up 10 days 8086 / tcp, 27017 / tcp, 0.0.0.0:1016->80/tcp csphere-controller

Step two: for example, we are here to interact and id is a40c6e58afbd this container, use the command: docker exec -t -i a40c6e58afbd / bin / bash, you'll get the following results:

root @ a40c6e58afbd: / #

This is the container command line, we can here typing the command, and the general of linux commands.

2, how to view the information container, the container comes from the image, inside there are a lot of configuration information, if we want to see this information, you can use the following command

The first step: the first container query, use the command: docker ps, following results were obtained:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

a40c6e58afbd mysql: 5.7 "/entrypoint.sh mysq 15 hours ago Up 15 hours 0.0.0.0:3306->3306/tcp db001

512013f5bd3a csphere / csphere: 0.11.2 "/ bin / csphere-init - 10 days ago Up 9 hours csphere-agent

631a4f91b2fb csphere / csphere: 0.11.2 "/ bin / csphere-init - 10 days ago Up 10 days 8086 / tcp, 27017 / tcp, 0.0.0.0:1016->80/tcp csphere-controller

Step 2: Use the command: docker inspect a40c6e58afbd last parameter is the genetic container id.

The results returned by the content here is not to write too much, in fact, when this information is stored in the host linux hosts / var / lib / docker / containers directory, the directory names that have a lot of very long folder, then enter these folders can be seen in several documents, such as a container into the folder using the command: ls -l, you can see the following information:

rw ------- 1 root root 76749 Jul 24 08:44 a40c6e58afbda0199111a2a2ef0af7e8dd9be057a610ca5f4f30aa782a5d9155-json.log
-rw-r - r-- 1 root root 2263 Jul 23 17:10 config.json
-rw-r - r-- 1 root root 543 Jul 23 17:10 hostconfig.json
-rw-r - r-- 1 root root 13 Jul 23 17:10 hostname
-rw-r - r-- 1 root root 176 Jul 23 17:10 hosts
-rw-r - r-- 1 root root 237 Jul 23 17:10 resolv.conf
-rw-r - r-- 1 root root 71 Jul 23 17:10 resolv.conf.hash
     
         
       
         
  More:      
 
- MySQL 5.6.26 source install (Database)
- MongoDB data replication and data slices (Database)
- JavaScript subarray Deduplication (Programming)
- MySQL uses mysqld_multi to deploy stand-alone multi-instance detail procedures (Database)
- Oracle Database Performance Optimization of memory disk (Database)
- Eight sorting algorithm implemented in Python (Programming)
- How to understand Python yield keyword (Programming)
- Nginx installation configuration Zabbix (Server)
- Firewall Configuration Red Hat Enterprise Linux 4 (Linux)
- How do I cancel (almost) any operations in Git, (Linux)
- CentOS 6.5 installation and configuration Cobbler (Server)
- Android Application Development: an argument between Activity (Programming)
- SELinux multi-level security (Linux)
- C ++, overloading, cover, hide (Programming)
- Linux network security backdoor technology and advanced skill practice (Linux)
- Ubuntu download install and configure Plank Dock (Linux)
- Learning Linux coding style (Programming)
- Debian installation (Linux)
- Approach the next Linux shared interrupts (Linux)
- Linux system security configuration (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.