dockerfile 的最佳实践
Dockerfile 编写nginx容器
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | [root@mast nginx] # cat Dockerfile FROM centos MAINTAINER zhaoruidong RUN yum -y install gcc gcc -c++ make openssl-devel pcre-devel gd-devel iproute net-tools telnet wget curl && yum clean all && rm -rf /var/cache/yum/ * RUN wget http: //nginx .org /download/nginx-1 .15.9. tar .gz && tar xf nginx-1.15.9. tar .gz && cd nginx-1.15.9 && \ . /configure --prefix= /usr/local/nginx \ --with-http_ssl_module \ --with-http_stub_status_module &&\ make -j 4 && make install && \ rm -f /usr/local/nginx/html/ * && echo "zhaoruidong" > /usr/local/nginx/html/index .html && \ cd / && rm -rf nginx* && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "daemon off;" >> /usr/local/nginx/conf/nginx .conf ENV PATH=$PATH: /usr/local/nginx/sbin EXPOSE 80 CMD [ "nginx" ] [root@mast nginx] # docker build -t cnginx:v1 . Sending build context to Docker daemon 2.56kB Step 1 /7 : FROM centos ---> 9f38484d220f Step 2 /7 : MAINTAINER zhaoruidong ---> Using cache ---> 6ee3155a2832 Step 3 /7 : RUN yum -y install gcc gcc -c++ make openssl-devel pcre-devel gd-devel iproute net-tools telnet wget curl && yum clean all && rm -rf /var/cache/yum/ * ---> Using cache ---> bd56d5f84909 Step 4 /7 : RUN wget http: //nginx .org /download/nginx-1 .15.9. tar .gz && tar xf nginx-1.15.9. tar .gz && cd nginx-1.15.9 && . /configure --prefix= /usr/local/nginx --with-http_ssl_module --w ith-http_stub_status_module && make -j 4 && make install && rm -f /usr/local/nginx/html/ * && echo "zhaoruidong" > /usr/local/nginx/html/index .html && cd / && rm -rf nginx* && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "daemon off;" >> /usr/local/nginx/conf/nginx .conf ---> Running in 65d7f98bca74 --2019-03-26 10:56:26-- http: //nginx .org /download/nginx-1 .15.9. tar .gz Resolving nginx.org (nginx.org)... 62.210.92.35, 95.211.80.227, 2001:1af8:4060:a004:21::e3 Connecting to nginx.org (nginx.org)|62.210.92.35|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http: //45 .252.224.78 /files/7139000007740BB4/nginx .org /download/nginx-1 .15.9. tar .gz [following] --2019-03-26 10:56:32-- http: //45 .252.224.78 /files/7139000007740BB4/nginx .org /download/nginx-1 .15.9. tar .gz Connecting to 45.252.224.78:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1031760 (1008K) [application /octet-stream ] Saving to: 'nginx-1.15.9.tar.gz' 0K .......... .......... .......... .......... .......... 4% 633K 2s 50K .......... .......... .......... .......... .......... 9% 16.3M 1s 100K .......... .......... .......... .......... .......... 14% 30.3M 0s 150K .......... .......... .......... .......... .......... 19% 4.25M 0s 200K .......... .......... .......... .......... .......... 24% 53.0M 0s 250K .......... .......... .......... .......... .......... 29% 300K 1s 300K .......... .......... .......... .......... .......... 34% 1.12M 1s 350K .......... .......... .......... .......... .......... 39% 5.80M 0s 400K .......... .......... .......... .......... .......... 44% 96.4M 0s 450K .......... .......... .......... .......... .......... 49% 4.28M 0s 500K .......... .......... .......... .......... .......... 54% 564K 0s 550K .......... .......... .......... .......... .......... 59% 1.79M 0s 600K .......... .......... .......... .......... .......... 64% 1.98M 0s 650K .......... .......... .......... .......... .......... 69% 43.6M 0s 700K .......... .......... .......... .......... .......... 74% 62.2M 0s 750K .......... .......... .......... .......... .......... 79% 13.9M 0s 800K .......... .......... .......... .......... .......... 84% 2.84M 0s 850K .......... .......... .......... .......... .......... 89% 5.27M 0s 900K .......... .......... .......... .......... .......... 94% 440K 0s 950K .......... .......... .......... .......... .......... 99% 51.2M 0s 1000K ....... 100% 922K=0.6s 2019-03-26 10:56:32 (1.58 MB /s ) - 'nginx-1.15.9.tar.gz' saved [1031760 /1031760 ] checking for OS + Linux 3.10.0-862.el7.x86_64 x86_64 checking for C compiler ... found + using GNU C compiler + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) checking for gcc -pipe switch ... found checking for -Wl,-E switch ... found checking for gcc builtin atomic operations ... found checking for C99 variadic macros ... found checking for gcc variadic macros ... found checking for gcc builtin 64 bit byteswap ... found checking for unistd.h ... found checking for inttypes.h ... found checking for limits.h ... found checking for sys /filio .h ... not found checking for sys /param .h ... found checking for sys /mount .h ... found checking for sys /statvfs .h ... found checking for crypt .h ... found checking for Linux specific features checking for epoll ... found checking for EPOLLRDHUP ... found checking for EPOLLEXCLUSIVE ... not found checking for O_PATH ... found checking for sendfile() ... found checking for sendfile64() ... found checking for sys /prctl .h ... found checking for prctl(PR_SET_DUMPABLE) ... found checking for prctl(PR_SET_KEEPCAPS) ... found checking for capabilities ... found checking for crypt_r() ... found checking for sys /vfs .h ... found checking for nobody group ... found checking for poll() ... found checking for /dev/poll ... not found checking for kqueue ... not found checking for crypt () ... not found checking for crypt () in libcrypt ... found checking for F_READAHEAD ... not found checking for posix_fadvise() ... found checking for O_DIRECT ... found checking for F_NOCACHE ... not found checking for directio() ... not found checking for statfs() ... found checking for statvfs() ... found checking for dlopen() ... not found checking for dlopen() in libdl ... found checking for sched_yield() ... found checking for sched_setaffinity() ... found checking for SO_SETFIB ... not found checking for SO_REUSEPORT ... found checking for SO_ACCEPTFILTER ... not found checking for SO_BINDANY ... not found checking for IP_TRANSPARENT ... found checking for IP_BINDANY ... not found checking for IP_BIND_ADDRESS_NO_PORT ... not found checking for IP_RECVDSTADDR ... not found checking for IP_SENDSRCADDR ... not found checking for IP_PKTINFO ... found checking for IPV6_RECVPKTINFO ... found checking for TCP_DEFER_ACCEPT ... found checking for TCP_KEEPIDLE ... found checking for TCP_FASTOPEN ... found checking for TCP_INFO ... found checking for accept4() ... found checking for eventfd() ... found checking for int size ... 4 bytes checking for long size ... 8 bytes checking for long long size ... 8 bytes checking for void * size ... 8 bytes checking for uint32_t ... found checking for uint64_t ... found checking for sig_atomic_t ... found checking for sig_atomic_t size ... 4 bytes checking for socklen_t ... found checking for in_addr_t ... found checking for in_port_t ... found checking for rlim_t ... found checking for uintptr_t ... uintptr_t found checking for system byte ordering ... little endian checking for size_t size ... 8 bytes checking for off_t size ... 8 bytes checking for time_t size ... 8 bytes checking for AF_INET6 ... found checking for setproctitle() ... not found checking for pread() ... found checking for pwrite() ... found checking for pwritev() ... found checking for sys_nerr ... found checking for localtime_r() ... found checking for clock_gettime(CLOCK_MONOTONIC) ... found checking for posix_memalign() ... found checking for memalign() ... found checking for mmap(MAP_ANON|MAP_SHARED) ... found checking for mmap( "/dev/zero" , MAP_SHARED) ... found checking for System V shared memory ... found checking for POSIX semaphores ... not found checking for POSIX semaphores in libpthread ... found checking for struct msghdr.msg_control ... found checking for ioctl(FIONBIO) ... found checking for struct tm.tm_gmtoff ... found checking for struct dirent.d_namlen ... not found checking for struct dirent.d_type ... found checking for sysconf(_SC_NPROCESSORS_ONLN) ... found checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found checking for openat(), fstatat() ... found checking for getaddrinfo() ... found checking for PCRE library ... found checking for PCRE JIT support ... found checking for OpenSSL library ... found checking for zlib library ... found creating objs /Makefile Configuration summary + using system PCRE library + using system OpenSSL library + using system zlib library nginx path prefix: "/usr/local/nginx" nginx binary file : "/usr/local/nginx/sbin/nginx" nginx modules path: "/usr/local/nginx/modules" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file : "/usr/local/nginx/conf/nginx.conf" nginx pid file : "/usr/local/nginx/logs/nginx.pid" nginx error log file : "/usr/local/nginx/logs/error.log" nginx http access log file : "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp" make -f objs /Makefile make [1]: Entering directory ` /nginx-1 .15.9' cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/nginx .o \ src /core/nginx .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_log .o \ src /core/ngx_log .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_palloc .o \ src /core/ngx_palloc .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_array .o \ src /core/ngx_array .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_list .o \ src /core/ngx_list .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_hash .o \ src /core/ngx_hash .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_buf .o \ src /core/ngx_buf .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_queue .o \ src /core/ngx_queue .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_output_chain .o \ src /core/ngx_output_chain .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_string .o \ src /core/ngx_string .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_parse .o \ src /core/ngx_parse .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_parse_time .o \ src /core/ngx_parse_time .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_inet .o \ src /core/ngx_inet .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_file .o \ src /core/ngx_file .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_crc32 .o \ src /core/ngx_crc32 .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_murmurhash .o \ src /core/ngx_murmurhash .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_md5 .o \ src /core/ngx_md5 .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_sha1 .o \ src /core/ngx_sha1 .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_rbtree .o \ src /core/ngx_rbtree .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_radix_tree .o \ src /core/ngx_radix_tree .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_slab .o \ src /core/ngx_slab .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_times .o \ src /core/ngx_times .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_shmtx .o \ src /core/ngx_shmtx .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_connection .o \ src /core/ngx_connection .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_cycle .o \ src /core/ngx_cycle .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_spinlock .o \ src /core/ngx_spinlock .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_rwlock .o \ src /core/ngx_rwlock .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_cpuinfo .o \ src /core/ngx_cpuinfo .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_conf_file .o \ src /core/ngx_conf_file .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_module .o \ src /core/ngx_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_resolver .o \ src /core/ngx_resolver .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_open_file_cache .o \ src /core/ngx_open_file_cache .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_crypt .o \ src /core/ngx_crypt .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_proxy_protocol .o \ src /core/ngx_proxy_protocol .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_syslog .o \ src /core/ngx_syslog .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event .o \ src /event/ngx_event .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_timer .o \ src /event/ngx_event_timer .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_posted .o \ src /event/ngx_event_posted .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_accept .o \ src /event/ngx_event_accept .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_udp .o \ src /event/ngx_event_udp .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_connect .o \ src /event/ngx_event_connect .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_pipe .o \ src /event/ngx_event_pipe .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_time .o \ src /os/unix/ngx_time .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_errno .o \ src /os/unix/ngx_errno .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_alloc .o \ src /os/unix/ngx_alloc .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_files .o \ src /os/unix/ngx_files .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_socket .o \ src /os/unix/ngx_socket .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_recv .o \ src /os/unix/ngx_recv .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_readv_chain .o \ src /os/unix/ngx_readv_chain .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_udp_recv .o \ src /os/unix/ngx_udp_recv .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_send .o \ src /os/unix/ngx_send .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_writev_chain .o \ src /os/unix/ngx_writev_chain .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_udp_send .o \ src /os/unix/ngx_udp_send .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_udp_sendmsg_chain .o \ src /os/unix/ngx_udp_sendmsg_chain .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_channel .o \ src /os/unix/ngx_channel .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_shmem .o \ src /os/unix/ngx_shmem .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_process .o \ src /os/unix/ngx_process .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_daemon .o \ src /os/unix/ngx_daemon .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_setaffinity .o \ src /os/unix/ngx_setaffinity .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_setproctitle .o \ src /os/unix/ngx_setproctitle .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_posix_init .o \ src /os/unix/ngx_posix_init .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_user .o \ src /os/unix/ngx_user .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_dlopen .o \ src /os/unix/ngx_dlopen .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_process_cycle .o \ src /os/unix/ngx_process_cycle .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_linux_init .o \ src /os/unix/ngx_linux_init .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/modules/ngx_epoll_module .o \ src /event/modules/ngx_epoll_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/os/unix/ngx_linux_sendfile_chain .o \ src /os/unix/ngx_linux_sendfile_chain .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_openssl .o \ src /event/ngx_event_openssl .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/event/ngx_event_openssl_stapling .o \ src /event/ngx_event_openssl_stapling .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /src/core/ngx_regex .o \ src /core/ngx_regex .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http .o \ src /http/ngx_http .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_core_module .o \ src /http/ngx_http_core_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_special_response .o \ src /http/ngx_http_special_response .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_request .o \ src /http/ngx_http_request .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_parse .o \ src /http/ngx_http_parse .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_log_module .o \ src /http/modules/ngx_http_log_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_request_body .o \ src /http/ngx_http_request_body .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_variables .o \ src /http/ngx_http_variables .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_script .o \ src /http/ngx_http_script .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_upstream .o \ src /http/ngx_http_upstream .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_upstream_round_robin .o \ src /http/ngx_http_upstream_round_robin .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_file_cache .o \ src /http/ngx_http_file_cache .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_write_filter_module .o \ src /http/ngx_http_write_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_header_filter_module .o \ src /http/ngx_http_header_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_chunked_filter_module .o \ src /http/modules/ngx_http_chunked_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_range_filter_module .o \ src /http/modules/ngx_http_range_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_gzip_filter_module .o \ src /http/modules/ngx_http_gzip_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_postpone_filter_module .o \ src /http/ngx_http_postpone_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_ssi_filter_module .o \ src /http/modules/ngx_http_ssi_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_charset_filter_module .o \ src /http/modules/ngx_http_charset_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_userid_filter_module .o \ src /http/modules/ngx_http_userid_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_headers_filter_module .o \ src /http/modules/ngx_http_headers_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/ngx_http_copy_filter_module .o \ src /http/ngx_http_copy_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_not_modified_filter_module .o \ src /http/modules/ngx_http_not_modified_filter_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_static_module .o \ src /http/modules/ngx_http_static_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_autoindex_module .o \ src /http/modules/ngx_http_autoindex_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_index_module .o \ src /http/modules/ngx_http_index_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_mirror_module .o \ src /http/modules/ngx_http_mirror_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_try_files_module .o \ src /http/modules/ngx_http_try_files_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_auth_basic_module .o \ src /http/modules/ngx_http_auth_basic_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_access_module .o \ src /http/modules/ngx_http_access_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_limit_conn_module .o \ src /http/modules/ngx_http_limit_conn_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_limit_req_module .o \ src /http/modules/ngx_http_limit_req_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_geo_module .o \ src /http/modules/ngx_http_geo_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_map_module .o \ src /http/modules/ngx_http_map_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_split_clients_module .o \ src /http/modules/ngx_http_split_clients_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_referer_module .o \ src /http/modules/ngx_http_referer_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_rewrite_module .o \ src /http/modules/ngx_http_rewrite_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_ssl_module .o \ src /http/modules/ngx_http_ssl_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_proxy_module .o \ src /http/modules/ngx_http_proxy_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_fastcgi_module .o \ src /http/modules/ngx_http_fastcgi_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_uwsgi_module .o \ src /http/modules/ngx_http_uwsgi_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_scgi_module .o \ src /http/modules/ngx_http_scgi_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_memcached_module .o \ src /http/modules/ngx_http_memcached_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_empty_gif_module .o \ src /http/modules/ngx_http_empty_gif_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_browser_module .o \ src /http/modules/ngx_http_browser_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_hash_module .o \ src /http/modules/ngx_http_upstream_hash_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_ip_hash_module .o \ src /http/modules/ngx_http_upstream_ip_hash_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_least_conn_module .o \ src /http/modules/ngx_http_upstream_least_conn_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_random_module .o \ src /http/modules/ngx_http_upstream_random_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_keepalive_module .o \ src /http/modules/ngx_http_upstream_keepalive_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_upstream_zone_module .o \ src /http/modules/ngx_http_upstream_zone_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs -I src /http -I src /http/modules \ -o objs /src/http/modules/ngx_http_stub_status_module .o \ src /http/modules/ngx_http_stub_status_module .c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src /core -I src /event -I src /event/modules -I src /os/unix -I objs \ -o objs /ngx_modules .o \ objs /ngx_modules .c sed -e "s|%%PREFIX%%|/usr/local/nginx|" \ -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \ -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \ -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \ < man /nginx .8 > objs /nginx .8 cc -o objs /nginx \ objs /src/core/nginx .o \ objs /src/core/ngx_log .o \ objs /src/core/ngx_palloc .o \ objs /src/core/ngx_array .o \ objs /src/core/ngx_list .o \ objs /src/core/ngx_hash .o \ objs /src/core/ngx_buf .o \ objs /src/core/ngx_queue .o \ objs /src/core/ngx_output_chain .o \ objs /src/core/ngx_string .o \ objs /src/core/ngx_parse .o \ objs /src/core/ngx_parse_time .o \ objs /src/core/ngx_inet .o \ objs /src/core/ngx_file .o \ objs /src/core/ngx_crc32 .o \ objs /src/core/ngx_murmurhash .o \ objs /src/core/ngx_md5 .o \ objs /src/core/ngx_sha1 .o \ objs /src/core/ngx_rbtree .o \ objs /src/core/ngx_radix_tree .o \ objs /src/core/ngx_slab .o \ objs /src/core/ngx_times .o \ objs /src/core/ngx_shmtx .o \ objs /src/core/ngx_connection .o \ objs /src/core/ngx_cycle .o \ objs /src/core/ngx_spinlock .o \ objs /src/core/ngx_rwlock .o \ objs /src/core/ngx_cpuinfo .o \ objs /src/core/ngx_conf_file .o \ objs /src/core/ngx_module .o \ objs /src/core/ngx_resolver .o \ objs /src/core/ngx_open_file_cache .o \ objs /src/core/ngx_crypt .o \ objs /src/core/ngx_proxy_protocol .o \ objs /src/core/ngx_syslog .o \ objs /src/event/ngx_event .o \ objs /src/event/ngx_event_timer .o \ objs /src/event/ngx_event_posted .o \ objs /src/event/ngx_event_accept .o \ objs /src/event/ngx_event_udp .o \ objs /src/event/ngx_event_connect .o \ objs /src/event/ngx_event_pipe .o \ objs /src/os/unix/ngx_time .o \ objs /src/os/unix/ngx_errno .o \ objs /src/os/unix/ngx_alloc .o \ objs /src/os/unix/ngx_files .o \ objs /src/os/unix/ngx_socket .o \ objs /src/os/unix/ngx_recv .o \ objs /src/os/unix/ngx_readv_chain .o \ objs /src/os/unix/ngx_udp_recv .o \ objs /src/os/unix/ngx_send .o \ objs /src/os/unix/ngx_writev_chain .o \ objs /src/os/unix/ngx_udp_send .o \ objs /src/os/unix/ngx_udp_sendmsg_chain .o \ objs /src/os/unix/ngx_channel .o \ objs /src/os/unix/ngx_shmem .o \ objs /src/os/unix/ngx_process .o \ objs /src/os/unix/ngx_daemon .o \ objs /src/os/unix/ngx_setaffinity .o \ objs /src/os/unix/ngx_setproctitle .o \ objs /src/os/unix/ngx_posix_init .o \ objs /src/os/unix/ngx_user .o \ objs /src/os/unix/ngx_dlopen .o \ objs /src/os/unix/ngx_process_cycle .o \ objs /src/os/unix/ngx_linux_init .o \ objs /src/event/modules/ngx_epoll_module .o \ objs /src/os/unix/ngx_linux_sendfile_chain .o \ objs /src/event/ngx_event_openssl .o \ objs /src/event/ngx_event_openssl_stapling .o \ objs /src/core/ngx_regex .o \ objs /src/http/ngx_http .o \ objs /src/http/ngx_http_core_module .o \ objs /src/http/ngx_http_special_response .o \ objs /src/http/ngx_http_request .o \ objs /src/http/ngx_http_parse .o \ objs /src/http/modules/ngx_http_log_module .o \ objs /src/http/ngx_http_request_body .o \ objs /src/http/ngx_http_variables .o \ objs /src/http/ngx_http_script .o \ objs /src/http/ngx_http_upstream .o \ objs /src/http/ngx_http_upstream_round_robin .o \ objs /src/http/ngx_http_file_cache .o \ objs /src/http/ngx_http_write_filter_module .o \ objs /src/http/ngx_http_header_filter_module .o \ objs /src/http/modules/ngx_http_chunked_filter_module .o \ objs /src/http/modules/ngx_http_range_filter_module .o \ objs /src/http/modules/ngx_http_gzip_filter_module .o \ objs /src/http/ngx_http_postpone_filter_module .o \ objs /src/http/modules/ngx_http_ssi_filter_module .o \ objs /src/http/modules/ngx_http_charset_filter_module .o \ objs /src/http/modules/ngx_http_userid_filter_module .o \ objs /src/http/modules/ngx_http_headers_filter_module .o \ objs /src/http/ngx_http_copy_filter_module .o \ objs /src/http/modules/ngx_http_not_modified_filter_module .o \ objs /src/http/modules/ngx_http_static_module .o \ objs /src/http/modules/ngx_http_autoindex_module .o \ objs /src/http/modules/ngx_http_index_module .o \ objs /src/http/modules/ngx_http_mirror_module .o \ objs /src/http/modules/ngx_http_try_files_module .o \ objs /src/http/modules/ngx_http_auth_basic_module .o \ objs /src/http/modules/ngx_http_access_module .o \ objs /src/http/modules/ngx_http_limit_conn_module .o \ objs /src/http/modules/ngx_http_limit_req_module .o \ objs /src/http/modules/ngx_http_geo_module .o \ objs /src/http/modules/ngx_http_map_module .o \ objs /src/http/modules/ngx_http_split_clients_module .o \ objs /src/http/modules/ngx_http_referer_module .o \ objs /src/http/modules/ngx_http_rewrite_module .o \ objs /src/http/modules/ngx_http_ssl_module .o \ objs /src/http/modules/ngx_http_proxy_module .o \ objs /src/http/modules/ngx_http_fastcgi_module .o \ objs /src/http/modules/ngx_http_uwsgi_module .o \ objs /src/http/modules/ngx_http_scgi_module .o \ objs /src/http/modules/ngx_http_memcached_module .o \ objs /src/http/modules/ngx_http_empty_gif_module .o \ objs /src/http/modules/ngx_http_browser_module .o \ objs /src/http/modules/ngx_http_upstream_hash_module .o \ objs /src/http/modules/ngx_http_upstream_ip_hash_module .o \ objs /src/http/modules/ngx_http_upstream_least_conn_module .o \ objs /src/http/modules/ngx_http_upstream_random_module .o \ objs /src/http/modules/ngx_http_upstream_keepalive_module .o \ objs /src/http/modules/ngx_http_upstream_zone_module .o \ objs /src/http/modules/ngx_http_stub_status_module .o \ objs /ngx_modules .o \ -ldl -lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lpthread -lz \ -Wl,-E make [1]: Leaving directory ` /nginx-1 .15.9' make -f objs /Makefile install make [1]: Entering directory ` /nginx-1 .15.9' test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx' test -d '/usr/local/nginx/sbin' \ || mkdir -p '/usr/local/nginx/sbin' test ! -f '/usr/local/nginx/sbin/nginx' \ || mv '/usr/local/nginx/sbin/nginx' \ '/usr/local/nginx/sbin/nginx.old' cp objs /nginx '/usr/local/nginx/sbin/nginx' test -d '/usr/local/nginx/conf' \ || mkdir -p '/usr/local/nginx/conf' cp conf /koi-win '/usr/local/nginx/conf' cp conf /koi-utf '/usr/local/nginx/conf' cp conf /win-utf '/usr/local/nginx/conf' test -f '/usr/local/nginx/conf/mime.types' \ || cp conf /mime .types '/usr/local/nginx/conf' cp conf /mime .types '/usr/local/nginx/conf/mime.types.default' test -f '/usr/local/nginx/conf/fastcgi_params' \ || cp conf /fastcgi_params '/usr/local/nginx/conf' cp conf /fastcgi_params \ '/usr/local/nginx/conf/fastcgi_params.default' test -f '/usr/local/nginx/conf/fastcgi.conf' \ || cp conf /fastcgi .conf '/usr/local/nginx/conf' cp conf /fastcgi .conf '/usr/local/nginx/conf/fastcgi.conf.default' test -f '/usr/local/nginx/conf/uwsgi_params' \ || cp conf /uwsgi_params '/usr/local/nginx/conf' cp conf /uwsgi_params \ '/usr/local/nginx/conf/uwsgi_params.default' test -f '/usr/local/nginx/conf/scgi_params' \ || cp conf /scgi_params '/usr/local/nginx/conf' cp conf /scgi_params \ '/usr/local/nginx/conf/scgi_params.default' test -f '/usr/local/nginx/conf/nginx.conf' \ || cp conf /nginx .conf '/usr/local/nginx/conf/nginx.conf' cp conf /nginx .conf '/usr/local/nginx/conf/nginx.conf.default' test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/html' \ || cp -R html '/usr/local/nginx' test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' make [1]: Leaving directory ` /nginx-1 .15.9' Removing intermediate container 65d7f98bca74 ---> d9b1b14c9188 Step 5 /7 : ENV PATH=$PATH: /usr/local/nginx/sbin ---> Running in 4d136c8eb05e Removing intermediate container 4d136c8eb05e ---> 7d70e3485318 Step 6 /7 : EXPOSE 80 ---> Running in 312e2e8981df Removing intermediate container 312e2e8981df ---> ac870c87c61c Step 7 /7 : CMD [ "nginx" ] ---> Running in f33324c09edb Removing intermediate container f33324c09edb ---> 22287f25de69 Successfully built 22287f25de69 Succe ssfully tagged cnginx:v1 [root@mast nginx] # docker images REPOSITORY TAG IMAGE ID CREATED SIZE cnginx v1 22287f25de69 2 minutes ago 341MB tomcat latest c7e1720a5f3d 5 hours ago 786MB centos latest 9f38484d220f 11 days ago 202MB busybox latest d8233ab899d4 5 weeks ago 1.2MB [root@mast nginx] # docker run -d --name nginx -p 88:80 cnginx:v1 [root@mast nginx] # ss -lntp | grep 88 LISTEN 0 128 :::88 :::* users :(( "docker-proxy" ,pid=60635,fd=4)) |
tomcat dockerfile 编写
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | [root@mast tomcat] # ls apache-tomcat-8.5.30. tar .gz Dockerfile jdk-8u171-linux-x64.rpm [root@mast tomcat] # cat Dockerfile FROM centos MAINTAINER chenxi ENV PATH= /java/tomcat/apache-tomcat-8 .5.30 /bin :$PATH WORKDIR /usr COPY jdk-8u171-linux-x64.rpm /usr COPY apache-tomcat-8.5.30. tar .gz /usr RUN rpm -ivh jdk-8u171-linux-x64.rpm && mkdir -pv /java/tomcat && tar -xf /usr/apache-tomcat-8 .5.30. tar .gz -C /java/tomcat EXPOSE 8080 ENTRYPOINT [ "catalina.sh" , "run" ] [root@mast tomcat] # docker build -t tomcat:v1 . Sending build context to Docker daemon 184.8MB Step 1 /9 : FROM centos ---> 9f38484d220f Step 2 /9 : MAINTAINER chenxi ---> Using cache ---> 8ce9cda44a85 Step 3 /9 : ENV PATH= /java/tomcat/apache-tomcat-8 .5.30 /bin :$PATH ---> Using cache ---> ab991eb2d2d5 Step 4 /9 : WORKDIR /usr ---> Using cache ---> f8d422a0638d Step 5 /9 : COPY jdk-8u171-linux-x64.rpm /usr ---> Using cache ---> c5ef8e81fd57 Step 6 /9 : COPY apache-tomcat-8.5.30. tar .gz /usr ---> Using cache ---> 6efa37a66951 Step 7 /9 : RUN rpm -ivh jdk-8u171-linux-x64.rpm && mkdir -pv /java/tomcat && tar -xf /usr/apache-tomcat-8 .5.30. tar .gz -C /java/tomcat ---> Using cache ---> a3447fa3b876 Step 8 /9 : EXPOSE 8080 ---> Using cache ---> a8eeb58ca3fe Step 9 /9 : ENTRYPOINT [ "catalina.sh" , "run" ] ---> Using cache ---> c7e1720a5f3d Successfully built c7e1720a5f3d Successfully tagged tomcat:v1 [root@mast tomcat] # vim Dockerfile FROM centos MAINTAINER chenxi ENV PATH= /java/tomcat/apache-tomcat-8 .5.30 /bin :$PATH WORKDIR /usr COPY jdk-8u171-linux-x64.rpm /usr COPY apache-tomcat-8.5.30. tar .gz /usr RUN rpm -ivh jdk-8u171-linux-x64.rpm && mkdir -pv /java/tomcat && tar xf apache-tomcat-8.5.30. tar .gz -C /java/tomcat && rm -f jdk-8u171-linux-x64.rpm apache-tomcat-8.5.30. tar .gz EXPOSE 8080 ENTRYPOINT [ "catalina.sh" , "run" ] [root@mast tomcat] # docker build -t tomcat:v2 . Sending build context to Docker daemon 184.8MB Step 1 /9 : FROM centos ---> 9f38484d220f Step 2 /9 : MAINTAINER chenxi ---> Using cache ---> 8ce9cda44a85 Step 3 /9 : ENV PATH= /java/tomcat/apache-tomcat-8 .5.30 /bin :$PATH ---> Using cache ---> ab991eb2d2d5 Step 4 /9 : WORKDIR /usr ---> Using cache ---> f8d422a0638d Step 5 /9 : COPY jdk-8u171-linux-x64.rpm /usr ---> Using cache ---> c5ef8e81fd57 Step 6 /9 : COPY apache-tomcat-8.5.30. tar .gz /usr ---> Using cache ---> 6efa37a66951 Step 7 /9 : RUN rpm -ivh jdk-8u171-linux-x64.rpm && mkdir -pv /java/tomcat && tar xf apache-tomcat-8.5.30. tar .gz -C /java/tomcat && rm -f jdk-8u171-linux-x64.rpm apache-tomcat-8.5.30. tar .gz ---> Running in 67377b7d7246 Preparing... ######################################## Updating / installing... jdk1.8-2000:1.8.0_171-fcs ######################################## Unpacking JAR files... tools.jar... plugin.jar... javaws.jar... deploy.jar... rt.jar... jsse.jar... charsets.jar... localedata.jar... mkdir : created directory '/java' mkdir : created directory '/java/tomcat' Removing intermediate container 67377b7d7246 ---> 4576ea700822 Step 8 /9 : EXPOSE 8080 ---> Running in dec83ecd7464 Removing intermediate container dec83ecd7464 ---> 68b72862a7a5 Step 9 /9 : ENTRYPOINT [ "catalina.sh" , "run" ] ---> Running in 4efc49f2139a Removing intermediate container 4efc49f2139a ---> 25fa5d942561 Successfully built 25fa5d942561 Successfully tagged tomcat:v2 [root@mast tomcat] # docker images REPOSITORY TAG IMAGE ID CREATED SIZE tomcat v2 25fa5d942561 About a minute ago 786MB cnginx v1 22287f25de69 16 minutes ago 341MB tomcat latest c7e1720a5f3d 5 hours ago 786MB tomcat v1 c7e1720a5f3d 5 hours ago 786MB centos latest 9f38484d220f 11 days ago 202MB busybox latest d8233ab899d4 5 weeks ago 1.2MB [root@mast tomcat] # docker run -d --name tomcat-v1 -p 86:8080 tomcat:v2 9848c6a9659b5b5701a52166fa8ecacb54b8779836a6148519d7a6a41c857aab [root@mast tomcat] # ss -lntp | grep 86 LISTEN 0 128 :::86 :::* users :(( "docker-proxy" ,pid=62109,fd=4)) |
草都可以从石头缝隙中长出来更可况你呢
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏