官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 元阳县| 黄梅县| 漳平市| 永康市| 甘孜县| 繁峙县| 楚雄市| 隆化县| 荔浦县| 综艺| 望城县| 司法| 永泰县| 高州市| 镇原县| 孝昌县| 三穗县| 固安县| 通榆县| 奎屯市| 大兴区| 平泉县| 和田市| 乌兰县| 邢台县| 石楼县| 建昌县| 运城市| 元朗区| 黑水县| 巧家县| 商丘市| 灵丘县| 洛南县| 滦南县| 民乐县| 周口市| 沁源县| 青州市| 通海县| 新巴尔虎右旗|