创建一个容器
[root@localhost ~]# docker run -d -P nginx:1.19.5
ca025dec1a527601bfa1c3bc0263de68a54e37cb5f0b0960dd8779241ec9f379
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ca025dec1a52 nginx:1.19.5 "/docker-entrypoin..." 3 seconds ago Up 3 seconds 0.0.0.0:32768->80/tcp confident_kalam
![959634a3aac6f3ad33dbd53043bebb87.png](https://i-blog.csdnimg.cn/blog_migrate/74f7b4c4dac3fbb811de18bc711cefe3.png)
[root@localhost ~]# docker history nginx
[root@localhost ~]# docker history nginx
IMAGE CREATED CREATED BY SIZE COMMENT
bc9a0695f571 6 days ago /bin/sh -c #(nop) CMD ["nginx" "-g" "daem... 0 B
<missing> 6 days ago /bin/sh -c #(nop) STOPSIGNAL SIGQUIT 0 B
<missing> 6 days ago /bin/sh -c #(nop) EXPOSE 80 0 B
<missing> 6 days ago /bin/sh -c #(nop) ENTRYPOINT ["/docker-en... 0 B
<missing> 6 days ago /bin/sh -c #(nop) COPY file:0fd5fca330dcd6... 1.04 kB
<missing> 6 days ago /bin/sh -c #(nop) COPY file:08ae525f517706... 1.95 kB
<missing> 6 days ago /bin/sh -c #(nop) COPY file:e7e183879c3571... 1.2 kB
<missing> 6 days ago /bin/sh -c set -x && addgroup --system... 63.6 MB
<missing> 6 days ago /bin/sh -c #(nop) ENV PKG_RELEASE=1~buster 0 B
<missing> 6 days ago /bin/sh -c #(nop) ENV NJS_VERSION=0.4.4 0 B
<missing> 6 days ago /bin/sh -c #(nop) ENV NGINX_VERSION=1.19.5 0 B
<missing> 13 days ago /bin/sh -c #(nop) LABEL maintainer=NGINX ... 0 B
<missing> 13 days ago /bin/sh -c #(nop) CMD ["bash"] 0 B
<missing> 13 days ago /bin/sh -c #(nop) ADD file:d2abb0e4e7ac177... 69.2 MB
![890a8e3ade7a1ebd8dadea531f91dd61.png](https://i-blog.csdnimg.cn/blog_migrate/19d28de8114aef04b307ed818dc24cee.jpeg)