docker search nginx
docker pull nginx
-d 后台运行#
--name 给容器起名字#
-p 宿主机端口:容器端口
docker run -d --name nginx01 -p 3344:80 nginx
[root@localhost ~]# docker exec -it nginx01 /bin/bash
root@7e30af2039f3:/# whereis nginx
nginx: /usr/sbin/nginx /usr/lib/nginx /etc/nginx /usr/share/nginx
root@7e30af2039f3:/# cd /etc/nginx
root@7e30af2039f3:/etc/nginx# ls
conf.d koi-utf mime.types nginx.conf uwsgi_params
fastcgi_params koi-win modules scgi_params win-utf
root@7e30af2039f3:/etc/nginx#
原文:https://www.cnblogs.com/ainiyo/p/13765353.html