部署nginx
1.下载镜像:docker pull nginx
2.运行测试:
[root@iZwz9g94s1ylux707g0qu3Z /]# docker images #查看镜像
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.7 a70d36bc331a 3 weeks ago 449MB
mysql latest c8562eaf9d81 3 weeks ago 546MB
nginx latest f6d0b4767a6c 4 weeks ago 133MB
centos latest 300e315adb2f 2 months ago 209MB
hello-world latest bf756fb1ae65 13 months ago 13.3kB
[root@iZwz9g94s1ylux707g0qu3Z /]# docker run -d --name nginx01 -p 3344:80 nginx #运行测试
afd1aa8bc5f9326b745a03abfb64da79113470c32460fdb0c48beda28dd70736
[root@iZwz9g94s1ylux707g0qu3Z /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS POR
afd1aa8bc5f9 nginx "/docker-entrypoint.…" 5 seconds ago Up 4 seconds 0.0
[root@iZwz9g94s1ylux707g0qu3Z /]# curl localhost:3344 #本机测试
<!DOCTYPE html>
<html>
<head>
<