作者:mobiledu2502911415 | 来源:互联网 | 2023-05-19 13:49
我正在尝试构建一个Nginx映像,以使用ngx_http_auth_request_module模块安装nginx。
这是我当前的docker文件:
#ubuntu OS
FROM ubuntu:14.04
#update apt-get non interactive and install nginx
RUN \
sudo apt-get -q -y update; \
sudo apt-get -q -y install nginx
#copy all mapping configurations for all environments
COPY ./resources/routing-configs/* /routing-configs/
#expose port for nginx
EXPOSE 80
#run task to copy only relevant mapping configuration to nginx and reload nginx service
COPY ./resources/start.sh /opt/mysite/router/start.sh
RUN sudo chmod 766 /opt/mysite/router/start.sh
CMD sudo -E sh /opt/mysite/router/start.sh
通常我会像这样在本地编译nginx文件:
sudo ./configure --with-http_auth_request_module
然后安装nginx
sudo make install
但是我该如何使用docker文件呢?
请帮忙