1. 下载
[root@host-10-23-110-128 mysql]# docker pull nginx:latest
latest: Pulling from library/nginx
a2abf6c4d29d: Already exists
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Pull complete
a0bcbecc962e: Pull complete
Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
[root@host-10-23-110-128 mysql]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 605c77e624dd 10 months ago 141MB
redis latest 7614ae9453d1 11 months ago 113MB
mysql latest 3218b38490ce 11 months ago 516MB
mongo 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]#