- Learning Docker
- Pethuru Raj Jeeva S. Chelladhurai Vinod Singh
- 400字
- 2021-07-16 14:07:01
Understanding the Docker setup
It's important to understand Docker's components and their versions, storage, execution drivers, file locations, and so on. Incidentally, the quest for understanding the Docker setup would also reveal whether the installation was successful or not. You can accomplish this by using two docker
subcommands, namely docker version
, and docker info
.
Let's start our docker
journey with the docker version
subcommand, as shown here:
$ sudo docker version Client version: 1.5.0 Client API version: 1.17 Go version (client): go1.4.1 Git commit (client): a8a31ef OS/Arch (client): linux/amd64 Server version: 1.5.0 Server API version: 1.17 Go version (server): go1.4.1 Git commit (server): a8a31ef
Although the docker version
subcommand lists many lines of text, as a Docker user, you should know what these following output lines mean:
- The client version
- The client API version
- The server version
- The server API version
The client and server versions that have been considered here are 1.5.0 and the client API and the server API, versions 1.17.
If we dissect the internals of the docker version
subcommand, then it will first list the client-related information that is stored locally. Subsequently, it will make a REST API call to the server over HTTP to obtain the server-related details.
Let's learn more about the Docker environment using the docker info
subcommand:
$ sudo docker -D info Containers: 0 Images: 0 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Execution Driver: native-0.2 Kernel Version: 3.13.0-45-generic Operating System: Ubuntu 14.04.1 LTS CPUs: 4 Total Memory: 3.908 GiB Name: dockerhost ID: ZNXR:QQSY:IGKJ:ZLYU:G4P7:AXVC:2KAJ:A3Q5:YCRQ:IJD3:7RON:IJ6Y Debug mode (server): false Debug mode (client): true Fds: 10 Goroutines: 14 EventsListeners: 0 Init Path: /usr/bin/docker Docker Root Dir: /var/lib/docker WARNING: No swap limit support
As you can see in the output of a freshly installed Docker engine, the number of Containers
and Images
is invariably nil. The Storage Driver
has been set up as aufs
, and the directory has been given the /var/lib/docker/aufs
location. The Execution Driver
has been set to the native
mode. This command also lists details, such as the Kernel Version
, the Operating System
, the number of CPUs
, the Total Memory
, and Name
, the new Docker hostname.
Client server communication
On Linux installations, Docker is usually programmed for carrying out server-client communication by using the Unix socket (/var/run/docker.sock
). Docker also has an IANA registered port, which is 2375
. However, for security reasons, this port is not enabled by default.
- C++面向?qū)ο蟪绦蛟O(shè)計(第三版)
- Kali Linux Web Penetration Testing Cookbook
- TestNG Beginner's Guide
- Python 3網(wǎng)絡(luò)爬蟲實戰(zhàn)
- 差分進(jìn)化算法及其高維多目標(biāo)優(yōu)化應(yīng)用
- Apex Design Patterns
- Python Web數(shù)據(jù)分析可視化:基于Django框架的開發(fā)實戰(zhàn)
- 基于SpringBoot實現(xiàn):Java分布式中間件開發(fā)入門與實戰(zhàn)
- Java7程序設(shè)計入門經(jīng)典
- Groovy 2 Cookbook
- Java自然語言處理(原書第2版)
- Data Manipulation with R(Second Edition)
- Java Web開發(fā)教程:基于Struts2+Hibernate+Spring
- 深入理解Kafka:核心設(shè)計與實踐原理
- Elasticsearch搜索引擎構(gòu)建入門與實戰(zhàn)