ドッキングウィンドウ-COMPOSE nginxの作成

ドッキングウィンドウ-COMPOSE nginxの作成

#######ドッキングウィンドウ・コン创建のnginx 
ます。mkdir
-p composetest / nginxの CD composetest > nginxの/ Dockerfile << EOF CentOSのFROM:6.8 WORKDIRは/ usr / SRC RUN yumを インストール -yのzlib-develのGD-develのをpcre- develのPCREのopenssl-develのLUA LUA-develのGCC のgcc -c ++ wgetの RUN のwget -q https://files.cnblogs.com/files/blog-lhong/nginx-1.0.8.tar.gz RUN のwget -qます。https:/ /files.cnblogs.com/files/blog-lhong/ngx_open.tar.gz RUN タール zxf ngx_open。タール .gzが-Cは/ usr / src / RUNタール zxf nginx- 1.08タール .gzが-Cは/ usr / src / WORKDIRは/ usr / src / nginx- 1.08 RUN useraddの -M -s / sbinに/ nologinにnginxの RUN。/設定--prefix =は/ usr / local / nginxの--user = nginxの--group = nginxの--with-http_stub_status_module --addモジュール=は/ usr / src / ngx_openresty / ngx_devel_kit --addモジュール=は/ usr / SRC / ngx_openresty /アレイ-VAR-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty /ヘッダなどより-nginxモジュール--addモジュール=は/ usr / src / ngx_openresty / RDS-CSV-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / AUTH-要求nginxのモジュール--addモジュール= / usr / src / ngx_openresty / iconvの-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / MEMC-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / RDS-JSON-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / redis2-nginxのモジュールは--addモジュール=は/ usr / src / ngx_openresty /セットMISC-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / エコー-nginxモジュール--addモジュール=は/ usr / src / ngx_openresty / srcache-nginxのモジュールは--addモジュール=は/ usr / src / ngx_openresty /暗号化されたセッション・nginxのモジュール--addモジュール= / USR / SRC / ngx_openresty /フォーム入力nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / XSS-nginxのモジュール--addモジュール=は/ usr / src / ngx_openresty / ngx_lua / --with-http_ssl_module --add-モジュール=は/ usr / src / ngx_openresty / ipseek --with-http_image_filter_module && メイク && メイク インストール RUN wgetの https://files.cnblogs.com/files/blog-lhong/ngservice.sh -Oの/ etc / init.dディレクトリ/ nginxの RUNは、chmodの 755 /etc/init.d/のnginxの RUNのchkconfigのを - nginxの追加 RUNをegrepの -v "#| ^ $ " /usr/local/nginx/conf/nginx.conf.default>は/ usr / local / nginxの/ confに/ nginx.conf RUN ます。mkdir -p /usr/local/nginx/conf/conf.d && SED -i " /サーバー{/私はconfに/ conf.d \ / \ * confにあります。; 'は/ usr / local / nginxの/ confに/ nginx.conf RUN ます。mkdir -p /データ/ HTML EXPOSE 80 CMD [ " は/ usr / local / nginxの/ sbinに/ nginxの"" -g "" デーモンオフ; " ] EOF ############################################## ます。mkdir -p /データ/ nginxの/{conf.d、HTML} >ドッカー-compose.yml << EOFの バージョン:" 3 " サービス: nginxの: ビルド:nginxの / ポート: - " 80:80 " ボリューム: - /data/nginx/conf.d: / usr / local / nginxの/ confに/ conf.d - /データ/ nginxの/ htmlの:/データ/ htmlの EOF ######################### #### ドッキングウィンドウ -compose -fドッキングウィンドウ-compose.ymlアップ- D #############################构建镜像 ドッキングウィンドウのビルドcomposetest / nginxの/ -t nginxの:V1。0.8

 

おすすめ

転載: www.cnblogs.com/blog-lhong/p/11880759.html