docker安装并配置nginx()

1. 下载

[root@host-10-23-110-128 mysql]# docker pull nginx:latestlatest: Pulling from library/nginxa2abf6c4d29d: Already exists a9edb18cadd1: Pull complete 589b7251471a: Pull complete 186b1aaa4aa6: Pull complete b4df32aa5a72: Pull complete a0bcbecc962e: Pull complete Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31Status: Downloaded newer image for nginx:latestdocker.io/library/nginx:latest[root@host-10-23-110-128 mysql]# docker imagesREPOSITORY   TAG       IMAGE ID       CREATED         SIZEnginx        latest    605c77e624dd   10 months ago   141MBredis        latest    7614ae9453d1   11 months ago   113MBmysql        latest    3218b38490ce   11 months ago   516MBmongo        latest    dfda7a2cf273   11 months ago   693MB[root@host-10-23-110-128 mysql]# 2. 配置

[root@host-10-23-110-128 data]# mkdir nginx[root@host-10-23-110-128 data]# cd nginx/[root@host-10-23-110-128 nginx]# ls[root@host-10-23-110-128 nginx]# mkdir www[root@host-10-23-110-128 nginx]# mkdir kig[root@host-10-23-110-128 nginx]# mkdir conf[root@host-10-23-110-128 nginx]#

————————

1. 下载

[root@host-10-23-110-128 mysql]# docker pull nginx:latestlatest: Pulling from library/nginxa2abf6c4d29d: Already exists a9edb18cadd1: Pull complete 589b7251471a: Pull complete 186b1aaa4aa6: Pull complete b4df32aa5a72: Pull complete a0bcbecc962e: Pull complete Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31Status: Downloaded newer image for nginx:latestdocker.io/library/nginx:latest[root@host-10-23-110-128 mysql]# docker imagesREPOSITORY   TAG       IMAGE ID       CREATED         SIZEnginx        latest    605c77e624dd   10 months ago   141MBredis        latest    7614ae9453d1   11 months ago   113MBmysql        latest    3218b38490ce   11 months ago   516MBmongo        latest    dfda7a2cf273   11 months ago   693MB[root@host-10-23-110-128 mysql]# 2. 配置

[root@host-10-23-110-128 data]# mkdir nginx[root@host-10-23-110-128 data]# cd nginx/[root@host-10-23-110-128 nginx]# ls[root@host-10-23-110-128 nginx]# mkdir www[root@host-10-23-110-128 nginx]# mkdir kig[root@host-10-23-110-128 nginx]# mkdir conf[root@host-10-23-110-128 nginx]#