- Docker Quick Start Guide
- Earl Waud
- 388字
- 2021-06-10 19:07:06
Information about command syntax
Before we dive into learning about Docker commands and their many options, I want to inform you of a change to the Docker CLI that happened in January 2017.
The number of commands and associated options have been increasing with each new release of Docker. Docker decided that the complexity this was creating needed to be addressed. So, with the release of Docker version 1.13 (Docker also changed the version numbing scheme in 2017), the CLI commands have been divided into management functional groups. For example, there is now a container management group of commands, and an image management group of commands. This changes how you run Docker commands. Here is an example of the use of the old and new run command:
# the new command syntax...
docker container run hello-world
# the old command syntax...
docker run hello-world
This change provides better command organization, but also adds some verbosity to the command line. It's a trade-off. For now, as far as I know, the old command syntax still works for all Docker commands, but for the rest of the examples in this book, I am planning to use the new syntax. At least I'll try, as old habits die hard.
One other note I would like to make here is that most command options have a short and long format. I will try to share the long format as an option in my examples at least once so you will know what the short version stands for. If you installed the Docker command-line completion, it will be a helpful resource for remembering both the new Docker management-based commands and the parameters that can be used with them. Here is a look at the top-level command-completion help for the container commands:

That command list gives us a sneak peek at some of the commands we are going to review in this chapter, so let's get started with learning Docker commands. In Chapter 1, Setting up a Docker Development Environment, we used two very common Docker commands: the version command and the run command. While you think you know pretty much everything there is to know about the version command, you may be surprised to learn that it has another trick up its sleeve. There is another version of Docker's version command.
- Mastering Proxmox(Third Edition)
- 人工智能超越人類
- 傳感器技術(shù)實(shí)驗(yàn)教程
- ROS機(jī)器人編程與SLAM算法解析指南
- 自動(dòng)化控制工程設(shè)計(jì)
- 大數(shù)據(jù)挑戰(zhàn)與NoSQL數(shù)據(jù)庫技術(shù)
- 視覺檢測技術(shù)及智能計(jì)算
- 信息物理系統(tǒng)(CPS)測試與評價(jià)技術(shù)
- Google SketchUp for Game Design:Beginner's Guide
- HTML5 Canvas Cookbook
- 工業(yè)機(jī)器人集成應(yīng)用
- 企業(yè)級Web開發(fā)實(shí)戰(zhàn)
- 大型機(jī)系統(tǒng)應(yīng)用基礎(chǔ)
- 局域網(wǎng)組建與使用完全自學(xué)手冊
- TensorFlow 2.0卷積神經(jīng)網(wǎng)絡(luò)實(shí)戰(zhàn)