docker 指定容器名字

docker:/root#  docker run -itd --name linux123 ubuntu /bin/bash
Unable to find image 'ubuntu:latest' locally
^Cdocker:/root#  docker run -itd --name nginx  linux123:jj /bin/bash
58455aa95b4b8d797d60bcf070a431b88d4070a6d02bba4d3c808d0d77ae039b
docker:/root# docker ps
CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS              PORTS               NAMES
58455aa95b4b        linux123:jj                  "/bin/bash"         2 seconds ago       Up 2 seconds                            nginx                 
cf329e96109d        centos_6.5:zjzc              "/bin/bash"         2 hours ago         Up 2 hours                              kickass_pasteur       
382cdd674040        centos_6.5_net:scan          "/bin/bash"         3 hours ago         Up 3 hours                              nostalgic_fermi       
ec430386e30c        centos-6-x86-template:zjzc   "/bin/bash"         3 hours ago         Up 3 hours                              hungry_pare           
c0895b3b9477        blalor/centos                "/bin/bash"         21 hours ago        Up 21 hours                             loving_meitner        
40d30fb0fc60        blalor/centos                "/bin/bash"         21 hours ago        Up 21 hours                             admiring_cray         
c0dfbb37f841        centos                       "/bin/bash"         22 hours ago        Up 22 hours                             fervent_ardinghelli   

原文地址:https://www.cnblogs.com/hzcya1995/p/13350947.html