docker from the aliases to run the container when the container

When you run the container, if the container is not a custom name, then, docker will default to a name, but better to play a few of the good, it is also easy to remember, at the same time conducive to distinguish

For example, I want to take an alias when running tomcat container, called tomcat

docker run --name=tomcat -it -p 8888:8080 tomcat 

Here Insert Picture Description
It can be found from the success of the alias, play a key parameter is the alias -name = xxx, as for the other parameters, see the need to choose to use.

Published 289 original articles · won praise 302 · views 50000 +

Guess you like

Origin blog.csdn.net/weixin_38106322/article/details/105099285