1. 如果你没有安装OpenResty,则按照下面的步骤进行安装
- 拉取镜像
docker pull openresty/openresty
- 拷贝容器中文件到宿主机目录
docker cp openresty:/usr/local/openresty/nginx/conf/nginx.conf /www/openresty/conf
docker cp openresty:/usr/local/openresty/lualib /www/openresty/
docker cp openresty:/usr/local/openresty/cert /www/openresty/
- 安装完成之后做目录映射并启动
docker run --name openresty -v /E/www/openresty/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf -v /E/www/openresty/conf/vhost/default.conf:/usr/local/openresty/nginx/conf/vhost/default.conf -v /E/www/openresty/logs/:/usr/local/openresty/nginx/logs -v /E/www/openresty/cert/:/usr/local/openresty/nginx/cert -v /E/www/openresty/lua/:/usr/local/openresty/nginx/lua -v /E/www/openresty/lualib/:/usr/local/openresty/lualib -v /E/www/openresty/html/:/usr/local/openresty/nginx/html -v /E/www/openresty/module/:/usr/local/openre