This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
docker:import_run_image [2020/03/03 16:20] admin |
docker:import_run_image [2020/03/03 16:26] (current) admin |
||
---|---|---|---|
Line 42: | Line 42: | ||
docker run httpd | docker run httpd | ||
</code> | </code> | ||
+ | |||
+ | <code bash> | ||
+ | [root@localhost ~]# docker images -a | ||
+ | REPOSITORY TAG IMAGE ID CREATED SIZE | ||
+ | httpd latest c5a012f9cf45 6 days ago 165MB | ||
+ | </code> | ||
+ | |||
+ | Then you can run image and "image" became docker container: | ||
+ | |||
+ | <code bash> | ||
+ | docker run -d httpd | ||
+ | </code> | ||
+ | or | ||
+ | <code bash> | ||
+ | docker run -d c5a012f9cf45 | ||
+ | </code> | ||
+ | |||
+ | Check is it docker container running : | ||
+ | |||
+ | <code bash> | ||
+ | docker ps -a | ||
+ | </code> | ||
+ | |||
+ | <code bash> | ||
+ | [root@localhost ~]# docker ps -a | ||
+ | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | ||
+ | 5154f5756a7a httpd "httpd-foreground" 43 seconds ago Up 42 seconds 80/tcp ecstatic_kare | ||
+ | |||
+ | </code> | ||
+ | |||
+ | |||
+ | |||