[root@localhost docker]# docker create -it ubuntu
92c1be95ba9e4c426bebc67495ffa77437cc0d788300ab7d39ef718376be9d53
[root@localhost docker]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92c1be95ba9e ubuntu "/bin/bash" 15 seconds ago Created dazzling_edison
d674138fdd8f ubuntu "/bin/bash" About an hour ago Exited (0) About an hour ago compassionate_agnesi
3651951871c0 ubuntu "/bin/bash" 7 hours ago Exited (255) 6 hours ago epic_brown
[root@localhost docker]# docker rm d67
d67
[root@localhost docker]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92c1be95ba9e ubuntu "/bin/bash" 2 minutes ago Created dazzling_edison
3651951871c0 ubuntu "/bin/bash" 7 hours ago Exited (255) 6 hours ago epic_brown
[root@localhost docker]# docker rm 365
输出365
[root@localhost docker]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92c1be95ba9e ubuntu "/bin/bash" 2 minutes ago Created dazzling_edison
[root@localhost docker]# docker run ubuntu /bin/echo ‘hello world’
输出‘hello world’