dockerfile 镜像构建

1、镜像的构建有手动与自动方式,这里我们介绍自动化的构建方式 ,dockerfile常用指令如下

2、构建指令build

Usage: docker image build [OPTIONS] PATH | URL | -
Options:
-t, --tag list # 镜像名称
-f, --file string # 指定Dockerfile文件位置

示例:
docker build .
docker build -t shykes/myapp .
docker build -t shykes/myapp -f /path/Dockerfile /path

3、nginx实例构建,完整构建过程如下

  1 [root@centos05 nginx]# pwd
  2 /root/nginx
  3 [root@centos05 nginx]# tree
  4 .
  5 ├── Dockerfile
  6 ├── nginx-1.12.1.tar.gz
  7 └── nginx.conf
  8 
  9 0 directories, 3 files
 10 [root@centos05 nginx]# docker build -t nginx:v1 .
 11 Sending build context to Docker daemon  985.6kB
 12 Step 1/10 : FROM centos:7
 13 7: Pulling from library/centos
 14 af4b0a2388c6: Pull complete 
 15 Digest: sha256:2671f7a3eea36ce43609e9fe7435ade83094291055f1c96d9d1d1d7c0b986a5d
 16 Status: Downloaded newer image for centos:7
 17  ---> ff426288ea90
 18 Step 2/10 : MAINTAINER 1335120568@qq.com
 19  ---> Running in af4d4057b169
 20  ---> 3b371196cfa8
 21 Removing intermediate container af4d4057b169
 22 Step 3/10 : RUN yum  install -y gcc gcc-c++ make openssl-devel  pcre-devel
 23  ---> Running in 29031d7c9247
 24 Loaded plugins: fastestmirror, ovl
 25 Determining fastest mirrors
 26  * base: mirror.bit.edu.cn
 27  * extras: mirror.bit.edu.cn
 28  * updates: mirrors.tuna.tsinghua.edu.cn
 29 Resolving Dependencies
 30 --> Running transaction check
 31 ---> Package gcc.x86_64 0:4.8.5-16.el7_4.1 will be installed
 32 --> Processing Dependency: libgomp = 4.8.5-16.el7_4.1 for package: gcc-4.8.5-16.el7_4.1.x86_64
 33 --> Processing Dependency: cpp = 4.8.5-16.el7_4.1 for package: gcc-4.8.5-16.el7_4.1.x86_64
 34 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-16.el7_4.1.x86_64
 35 --> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-16.el7_4.1.x86_64
 36 --> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-16.el7_4.1.x86_64
 37 --> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.8.5-16.el7_4.1.x86_64
 38 ---> Package gcc-c++.x86_64 0:4.8.5-16.el7_4.1 will be installed
 39 --> Processing Dependency: libstdc++-devel = 4.8.5-16.el7_4.1 for package: gcc-c++-4.8.5-16.el7_4.1.x86_64
 40 ---> Package make.x86_64 1:3.82-23.el7 will be installed
 41 ---> Package openssl-devel.x86_64 1:1.0.2k-8.el7 will be installed
 42 --> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.2k-8.el7.x86_64
 43 --> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-8.el7.x86_64
 44 ---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
 45 --> Running transaction check
 46 ---> Package cpp.x86_64 0:4.8.5-16.el7_4.1 will be installed
 47 ---> Package glibc-devel.x86_64 0:2.17-196.el7_4.2 will be installed
 48 --> Processing Dependency: glibc-headers = 2.17-196.el7_4.2 for package: glibc-devel-2.17-196.el7_4.2.x86_64
 49 --> Processing Dependency: glibc-headers for package: glibc-devel-2.17-196.el7_4.2.x86_64
 50 ---> Package krb5-devel.x86_64 0:1.15.1-8.el7 will be installed
 51 --> Processing Dependency: libkadm5(x86-64) = 1.15.1-8.el7 for package: krb5-devel-1.15.1-8.el7.x86_64
 52 --> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-8.el7.x86_64
 53 --> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-8.el7.x86_64
 54 --> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-8.el7.x86_64
 55 --> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-8.el7.x86_64
 56 ---> Package libgomp.x86_64 0:4.8.5-16.el7_4.1 will be installed
 57 ---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
 58 ---> Package libstdc++-devel.x86_64 0:4.8.5-16.el7_4.1 will be installed
 59 ---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
 60 ---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
 61 --> Running transaction check
 62 ---> Package glibc-headers.x86_64 0:2.17-196.el7_4.2 will be installed
 63 --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-196.el7_4.2.x86_64
 64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.17-196.el7_4.2.x86_64
 65 ---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
 66 ---> Package libcom_err-devel.x86_64 0:1.42.9-10.el7 will be installed
 67 ---> Package libkadm5.x86_64 0:1.15.1-8.el7 will be installed
 68 ---> Package libselinux-devel.x86_64 0:2.5-11.el7 will be installed
 69 --> Processing Dependency: libsepol-devel(x86-64) >= 2.5-6 for package: libselinux-devel-2.5-11.el7.x86_64
 70 --> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-11.el7.x86_64
 71 ---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
 72 --> Running transaction check
 73 ---> Package kernel-headers.x86_64 0:3.10.0-693.11.6.el7 will be installed
 74 ---> Package libsepol-devel.x86_64 0:2.5-6.el7 will be installed
 75 --> Finished Dependency Resolution
 76 
 77 Dependencies Resolved
 78 
 79 ================================================================================
 80  Package                 Arch       Version                   Repository   Size
 81 ================================================================================
 82 Installing:
 83  gcc                     x86_64     4.8.5-16.el7_4.1          updates      16 M
 84  gcc-c++                 x86_64     4.8.5-16.el7_4.1          updates     7.2 M
 85  make                    x86_64     1:3.82-23.el7             base        420 k
 86  openssl-devel           x86_64     1:1.0.2k-8.el7            base        1.5 M
 87  pcre-devel              x86_64     8.32-17.el7               base        480 k
 88 Installing for dependencies:
 89  cpp                     x86_64     4.8.5-16.el7_4.1          updates     5.9 M
 90  glibc-devel             x86_64     2.17-196.el7_4.2          updates     1.1 M
 91  glibc-headers           x86_64     2.17-196.el7_4.2          updates     676 k
 92  kernel-headers          x86_64     3.10.0-693.11.6.el7       updates     6.0 M
 93  keyutils-libs-devel     x86_64     1.5.8-3.el7               base         37 k
 94  krb5-devel              x86_64     1.15.1-8.el7              base        266 k
 95  libcom_err-devel        x86_64     1.42.9-10.el7             base         31 k
 96  libgomp                 x86_64     4.8.5-16.el7_4.1          updates     154 k
 97  libkadm5                x86_64     1.15.1-8.el7              base        174 k
 98  libmpc                  x86_64     1.0.1-3.el7               base         51 k
 99  libselinux-devel        x86_64     2.5-11.el7                base        186 k
100  libsepol-devel          x86_64     2.5-6.el7                 base         74 k
101  libstdc++-devel         x86_64     4.8.5-16.el7_4.1          updates     1.5 M
102  libverto-devel          x86_64     0.2.5-4.el7               base         12 k
103  mpfr                    x86_64     3.1.1-4.el7               base        203 k
104  zlib-devel              x86_64     1.2.7-17.el7              base         50 k
105 
106 Transaction Summary
107 ================================================================================
108 Install  5 Packages (+16 Dependent packages)
109 
110 Total download size: 42 M
111 Installed size: 91 M
112 Downloading packages:
113 Public key for glibc-devel-2.17-196.el7_4.2.x86_64.rpm is not installed
114 warning: /var/cache/yum/x86_64/7/updates/packages/glibc-devel-2.17-196.el7_4.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
115 Public key for keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm is not installed
116 warning: /var/cache/yum/x86_64/7/updates/packages/glibc-devel-2.17-196.el7_4.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
117 Public key for keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm is not installed
118 --------------------------------------------------------------------------------
119 Total                                              976 kB/s |  42 MB  00:44     
120 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
121 Importing GPG key 0xF4A80EB5:
122  Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
123  Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
124  Package    : centos-release-7-4.1708.el7.centos.x86_64 (@CentOS)
125  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
126 Running transaction check
127 Running transaction test
128 Transaction test succeeded
129 Running transaction
130   Installing : mpfr-3.1.1-4.el7.x86_64                                     1/21 
131   Installing : libmpc-1.0.1-3.el7.x86_64                                   2/21 
132   Installing : cpp-4.8.5-16.el7_4.1.x86_64                                 3/21 
133   Installing : libkadm5-1.15.1-8.el7.x86_64                                4/21 
134   Installing : kernel-headers-3.10.0-693.11.6.el7.x86_64                   5/21 
135   Installing : glibc-headers-2.17-196.el7_4.2.x86_64                       6/21 
136   Installing : glibc-devel-2.17-196.el7_4.2.x86_64                         7/21 
137   Installing : libsepol-devel-2.5-6.el7.x86_64                             8/21 
138   Installing : libgomp-4.8.5-16.el7_4.1.x86_64                             9/21 
139   Installing : gcc-4.8.5-16.el7_4.1.x86_64                                10/21 
140   Installing : zlib-devel-1.2.7-17.el7.x86_64                             11/21 
141   Installing : pcre-devel-8.32-17.el7.x86_64                              12/21 
142   Installing : libselinux-devel-2.5-11.el7.x86_64                         13/21 
143   Installing : libcom_err-devel-1.42.9-10.el7.x86_64                      14/21 
144   Installing : libverto-devel-0.2.5-4.el7.x86_64                          15/21 
145   Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64                     16/21 
146   Installing : krb5-devel-1.15.1-8.el7.x86_64                             17/21 
147   Installing : libstdc++-devel-4.8.5-16.el7_4.1.x86_64                    18/21 
148   Installing : gcc-c++-4.8.5-16.el7_4.1.x86_64                            19/21 
149   Installing : 1:openssl-devel-1.0.2k-8.el7.x86_64                        20/21 
150   Installing : 1:make-3.82-23.el7.x86_64                                  21/21 
151   Verifying  : cpp-4.8.5-16.el7_4.1.x86_64                                 1/21 
152   Verifying  : glibc-devel-2.17-196.el7_4.2.x86_64                         2/21 
153   Verifying  : libstdc++-devel-4.8.5-16.el7_4.1.x86_64                     3/21 
154   Verifying  : keyutils-libs-devel-1.5.8-3.el7.x86_64                      4/21 
155   Verifying  : libverto-devel-0.2.5-4.el7.x86_64                           5/21 
156   Verifying  : libselinux-devel-2.5-11.el7.x86_64                          6/21 
157   Verifying  : krb5-devel-1.15.1-8.el7.x86_64                              7/21 
158   Verifying  : libcom_err-devel-1.42.9-10.el7.x86_64                       8/21 
159   Verifying  : gcc-c++-4.8.5-16.el7_4.1.x86_64                             9/21 
160   Verifying  : mpfr-3.1.1-4.el7.x86_64                                    10/21 
161   Verifying  : pcre-devel-8.32-17.el7.x86_64                              11/21 
162   Verifying  : zlib-devel-1.2.7-17.el7.x86_64                             12/21 
163   Verifying  : libgomp-4.8.5-16.el7_4.1.x86_64                            13/21 
164   Verifying  : 1:make-3.82-23.el7.x86_64                                  14/21 
165   Verifying  : libmpc-1.0.1-3.el7.x86_64                                  15/21 
166   Verifying  : libsepol-devel-2.5-6.el7.x86_64                            16/21 
167   Verifying  : kernel-headers-3.10.0-693.11.6.el7.x86_64                  17/21 
168   Verifying  : 1:openssl-devel-1.0.2k-8.el7.x86_64                        18/21 
169   Verifying  : glibc-headers-2.17-196.el7_4.2.x86_64                      19/21 
170   Verifying  : gcc-4.8.5-16.el7_4.1.x86_64                                20/21 
171   Verifying  : libkadm5-1.15.1-8.el7.x86_64                               21/21 
172 
173 Installed:
174   gcc.x86_64 0:4.8.5-16.el7_4.1        gcc-c++.x86_64 0:4.8.5-16.el7_4.1       
175   make.x86_64 1:3.82-23.el7            openssl-devel.x86_64 1:1.0.2k-8.el7     
176   pcre-devel.x86_64 0:8.32-17.el7     
177 
178 Dependency Installed:
179   cpp.x86_64 0:4.8.5-16.el7_4.1                                                 
180   glibc-devel.x86_64 0:2.17-196.el7_4.2                                         
181   glibc-headers.x86_64 0:2.17-196.el7_4.2                                       
182   kernel-headers.x86_64 0:3.10.0-693.11.6.el7                                   
183   keyutils-libs-devel.x86_64 0:1.5.8-3.el7                                      
184   krb5-devel.x86_64 0:1.15.1-8.el7                                              
185   libcom_err-devel.x86_64 0:1.42.9-10.el7                                       
186   libgomp.x86_64 0:4.8.5-16.el7_4.1                                             
187   libkadm5.x86_64 0:1.15.1-8.el7                                                
188   libmpc.x86_64 0:1.0.1-3.el7                                                   
189   libselinux-devel.x86_64 0:2.5-11.el7                                          
190   libsepol-devel.x86_64 0:2.5-6.el7                                             
191   libstdc++-devel.x86_64 0:4.8.5-16.el7_4.1                                     
192   libverto-devel.x86_64 0:0.2.5-4.el7                                           
193   mpfr.x86_64 0:3.1.1-4.el7                                                     
194   zlib-devel.x86_64 0:1.2.7-17.el7                                              
195 
196 Complete!
197  ---> 929518dfe4a3
198 Removing intermediate container 29031d7c9247
199 Step 4/10 : ADD nginx-1.12.1.tar.gz /tmp
200  ---> 3327512c6204
201 Step 5/10 : RUN cd /tmp/nginx-1.12.1 &&     ./configure --prefix=/usr/local/nginx &&     make && make install
202  ---> Running in 048ad6f78b44
203 checking for OS
204  + Linux 3.10.0-693.el7.x86_64 x86_64
205 checking for C compiler ... found
206  + using GNU C compiler
207  + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 
208 checking for gcc -pipe switch ... found
209 checking for -Wl,-E switch ... found
210 checking for gcc builtin atomic operations ... found
211 checking for C99 variadic macros ... found
212 checking for gcc variadic macros ... found
213 checking for gcc builtin 64 bit byteswap ... found
214 checking for unistd.h ... found
215 checking for inttypes.h ... found
216 checking for limits.h ... found
217 checking for sys/filio.h ... not found
218 checking for sys/param.h ... found
219 checking for sys/mount.h ... found
220 checking for sys/statvfs.h ... found
221 checking for crypt.h ... found
222 checking for Linux specific features
223 checking for epoll ... found
224 checking for EPOLLRDHUP ... found
225 checking for EPOLLEXCLUSIVE ... not found
226 checking for O_PATH ... found
227 checking for sendfile() ... found
228 checking for sendfile64() ... found
229 checking for sys/prctl.h ... found
230 checking for prctl(PR_SET_DUMPABLE) ... found
231 checking for sched_setaffinity() ... found
232 checking for crypt_r() ... found
233 checking for sys/vfs.h ... found
234 checking for nobody group ... found
235 checking for poll() ... found
236 checking for /dev/poll ... not found
237 checking for kqueue ... not found
238 checking for crypt() ... not found
239 checking for crypt() in libcrypt ... found
240 checking for F_READAHEAD ... not found
241 checking for posix_fadvise() ... found
242 checking for O_DIRECT ... found
243 checking for F_NOCACHE ... not found
244 checking for directio() ... not found
245 checking for statfs() ... found
246 checking for statvfs() ... found
247 checking for dlopen() ... not found
248 checking for dlopen() in libdl ... found
249 checking for sched_yield() ... found
250 checking for SO_SETFIB ... not found
251 checking for SO_REUSEPORT ... found
252 checking for SO_ACCEPTFILTER ... not found
253 checking for SO_BINDANY ... not found
254 checking for IP_BIND_ADDRESS_NO_PORT ... not found
255 checking for IP_TRANSPARENT ... found
256 checking for IP_BINDANY ... not found
257 checking for IP_RECVDSTADDR ... not found
258 checking for IP_PKTINFO ... found
259 checking for IPV6_RECVPKTINFO ... found
260 checking for TCP_DEFER_ACCEPT ... found
261 checking for TCP_KEEPIDLE ... found
262 checking for TCP_FASTOPEN ... found
263 checking for TCP_INFO ... found
264 checking for accept4() ... found
265 checking for eventfd() ... found
266 checking for int size ... 4 bytes
267 checking for long size ... 8 bytes
268 checking for long long size ... 8 bytes
269 checking for void * size ... 8 bytes
270 checking for uint32_t ... found
271 checking for uint64_t ... found
272 checking for sig_atomic_t ... found
273 checking for sig_atomic_t size ... 4 bytes
274 checking for socklen_t ... found
275 checking for in_addr_t ... found
276 checking for in_port_t ... found
277 checking for rlim_t ... found
278 checking for uintptr_t ... uintptr_t found
279 checking for system byte ordering ... little endian
280 checking for size_t size ... 8 bytes
281 checking for off_t size ... 8 bytes
282 checking for time_t size ... 8 bytes
283 checking for AF_INET6 ... found
284 checking for setproctitle() ... not found
285 checking for pread() ... found
286 checking for pwrite() ... found
287 checking for pwritev() ... found
288 checking for sys_nerr ... found
289 checking for localtime_r() ... found
290 checking for posix_memalign() ... found
291 checking for memalign() ... found
292 checking for mmap(MAP_ANON|MAP_SHARED) ... found
293 checking for mmap("/dev/zero", MAP_SHARED) ... found
294 checking for System V shared memory ... found
295 checking for POSIX semaphores ... not found
296 checking for POSIX semaphores in libpthread ... found
297 checking for struct msghdr.msg_control ... found
298 checking for ioctl(FIONBIO) ... found
299 checking for struct tm.tm_gmtoff ... found
300 checking for struct dirent.d_namlen ... not found
301 checking for struct dirent.d_type ... found
302 checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
303 checking for openat(), fstatat() ... found
304 checking for getaddrinfo() ... found
305 checking for PCRE library ... found
306 checking for PCRE JIT support ... found
307 checking for zlib library ... found
308 creating objs/Makefile
309 
310 Configuration summary
311   + using system PCRE library
312   + OpenSSL library is not used
313   + using system zlib library
314 
315   nginx path prefix: "/usr/local/nginx"
316   nginx binary file: "/usr/local/nginx/sbin/nginx"
317   nginx modules path: "/usr/local/nginx/modules"
318   nginx configuration prefix: "/usr/local/nginx/conf"
319   nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
320   nginx pid file: "/usr/local/nginx/logs/nginx.pid"
321   nginx error log file: "/usr/local/nginx/logs/error.log"
322   nginx http access log file: "/usr/local/nginx/logs/access.log"
323   nginx http client request body temporary files: "client_body_temp"
324   nginx http proxy temporary files: "proxy_temp"
325   nginx http fastcgi temporary files: "fastcgi_temp"
326   nginx http uwsgi temporary files: "uwsgi_temp"
327   nginx http scgi temporary files: "scgi_temp"
328 
329 make -f objs/Makefile
330 make[1]: Entering directory `/tmp/nginx-1.12.1'
331 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 
332     -o objs/src/core/nginx.o 
333     src/core/nginx.c
334 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 
335     -o objs/src/core/ngx_log.o 
336     src/core/ngx_log.c
337 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 
338     -o objs/src/core/ngx_palloc.o 
339     src/core/ngx_palloc.c
340 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 
341     -o objs/src/core/ngx_array.o 
342     src/core/ngx_array.c
343 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 
344     -o objs/src/core/ngx_list.o 
345     src/core/ngx_list.c
346 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 
347     -o objs/src/core/ngx_hash.o 
348     src/core/ngx_hash.c
349 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 
350     -o objs/src/core/ngx_buf.o 
351     src/core/ngx_buf.c
352 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 
353     -o objs/src/core/ngx_queue.o 
354     src/core/ngx_queue.c
355 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 
356     -o objs/src/core/ngx_output_chain.o 
357     src/core/ngx_output_chain.c
358 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 
359     -o objs/src/core/ngx_string.o 
360     src/core/ngx_string.c
361 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 
362     -o objs/src/core/ngx_parse.o 
363     src/core/ngx_parse.c
364 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 
365     -o objs/src/core/ngx_parse_time.o 
366     src/core/ngx_parse_time.c
367 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 
368     -o objs/src/core/ngx_inet.o 
369     src/core/ngx_inet.c
370 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 
371     -o objs/src/core/ngx_file.o 
372     src/core/ngx_file.c
373 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 
374     -o objs/src/core/ngx_crc32.o 
375     src/core/ngx_crc32.c
376 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 
377     -o objs/src/core/ngx_murmurhash.o 
378     src/core/ngx_murmurhash.c
379 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 
380     -o objs/src/core/ngx_md5.o 
381     src/core/ngx_md5.c
382 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 
383     -o objs/src/core/ngx_sha1.o 
384     src/core/ngx_sha1.c
385 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 
386     -o objs/src/core/ngx_rbtree.o 
387     src/core/ngx_rbtree.c
388 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 
389     -o objs/src/core/ngx_radix_tree.o 
390     src/core/ngx_radix_tree.c
391 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 
392     -o objs/src/core/ngx_slab.o 
393     src/core/ngx_slab.c
394 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 
395     -o objs/src/core/ngx_times.o 
396     src/core/ngx_times.c
397 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 
398     -o objs/src/core/ngx_shmtx.o 
399     src/core/ngx_shmtx.c
400 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 
401     -o objs/src/core/ngx_connection.o 
402     src/core/ngx_connection.c
403 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 
404     -o objs/src/core/ngx_cycle.o 
405     src/core/ngx_cycle.c
406 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 
407     -o objs/src/core/ngx_spinlock.o 
408     src/core/ngx_spinlock.c
409 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 
410     -o objs/src/core/ngx_rwlock.o 
411     src/core/ngx_rwlock.c
412 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 
413     -o objs/src/core/ngx_cpuinfo.o 
414     src/core/ngx_cpuinfo.c
415 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 
416     -o objs/src/core/ngx_conf_file.o 
417     src/core/ngx_conf_file.c
418 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 
419     -o objs/src/core/ngx_module.o 
420     src/core/ngx_module.c
421 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 
422     -o objs/src/core/ngx_resolver.o 
423     src/core/ngx_resolver.c
424 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 
425     -o objs/src/core/ngx_open_file_cache.o 
426     src/core/ngx_open_file_cache.c
427 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 
428     -o objs/src/core/ngx_crypt.o 
429     src/core/ngx_crypt.c
430 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 
431     -o objs/src/core/ngx_proxy_protocol.o 
432     src/core/ngx_proxy_protocol.c
433 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 
434     -o objs/src/core/ngx_syslog.o 
435     src/core/ngx_syslog.c
436 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 
437     -o objs/src/event/ngx_event.o 
438     src/event/ngx_event.c
439 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 
440     -o objs/src/event/ngx_event_timer.o 
441     src/event/ngx_event_timer.c
442 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 
443     -o objs/src/event/ngx_event_posted.o 
444     src/event/ngx_event_posted.c
445 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 
446     -o objs/src/event/ngx_event_accept.o 
447     src/event/ngx_event_accept.c
448 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 
449     -o objs/src/event/ngx_event_connect.o 
450     src/event/ngx_event_connect.c
451 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 
452     -o objs/src/event/ngx_event_pipe.o 
453     src/event/ngx_event_pipe.c
454 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 
455     -o objs/src/os/unix/ngx_time.o 
456     src/os/unix/ngx_time.c
457 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 
458     -o objs/src/os/unix/ngx_errno.o 
459     src/os/unix/ngx_errno.c
460 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 
461     -o objs/src/os/unix/ngx_alloc.o 
462     src/os/unix/ngx_alloc.c
463 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 
464     -o objs/src/os/unix/ngx_files.o 
465     src/os/unix/ngx_files.c
466 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 
467     -o objs/src/os/unix/ngx_socket.o 
468     src/os/unix/ngx_socket.c
469 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 
470     -o objs/src/os/unix/ngx_recv.o 
471     src/os/unix/ngx_recv.c
472 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 
473     -o objs/src/os/unix/ngx_readv_chain.o 
474     src/os/unix/ngx_readv_chain.c
475 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 
476     -o objs/src/os/unix/ngx_udp_recv.o 
477     src/os/unix/ngx_udp_recv.c
478 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 
479     -o objs/src/os/unix/ngx_send.o 
480     src/os/unix/ngx_send.c
481 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 
482     -o objs/src/os/unix/ngx_writev_chain.o 
483     src/os/unix/ngx_writev_chain.c
484 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 
485     -o objs/src/os/unix/ngx_udp_send.o 
486     src/os/unix/ngx_udp_send.c
487 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 
488     -o objs/src/os/unix/ngx_udp_sendmsg_chain.o 
489     src/os/unix/ngx_udp_sendmsg_chain.c
490 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 
491     -o objs/src/os/unix/ngx_channel.o 
492     src/os/unix/ngx_channel.c
493 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 
494     -o objs/src/os/unix/ngx_shmem.o 
495     src/os/unix/ngx_shmem.c
496 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 
497     -o objs/src/os/unix/ngx_process.o 
498     src/os/unix/ngx_process.c
499 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 
500     -o objs/src/os/unix/ngx_daemon.o 
501     src/os/unix/ngx_daemon.c
502 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 
503     -o objs/src/os/unix/ngx_setaffinity.o 
504     src/os/unix/ngx_setaffinity.c
505 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 
506     -o objs/src/os/unix/ngx_setproctitle.o 
507     src/os/unix/ngx_setproctitle.c
508 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 
509     -o objs/src/os/unix/ngx_posix_init.o 
510     src/os/unix/ngx_posix_init.c
511 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 
512     -o objs/src/os/unix/ngx_user.o 
513     src/os/unix/ngx_user.c
514 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 
515     -o objs/src/os/unix/ngx_dlopen.o 
516     src/os/unix/ngx_dlopen.c
517 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 
518     -o objs/src/os/unix/ngx_process_cycle.o 
519     src/os/unix/ngx_process_cycle.c
520 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 
521     -o objs/src/os/unix/ngx_linux_init.o 
522     src/os/unix/ngx_linux_init.c
523 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 
524     -o objs/src/event/modules/ngx_epoll_module.o 
525     src/event/modules/ngx_epoll_module.c
526 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 
527     -o objs/src/os/unix/ngx_linux_sendfile_chain.o 
528     src/os/unix/ngx_linux_sendfile_chain.c
529 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 
530     -o objs/src/core/ngx_regex.o 
531     src/core/ngx_regex.c
532 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 
533     -o objs/src/http/ngx_http.o 
534     src/http/ngx_http.c
535 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 
536     -o objs/src/http/ngx_http_core_module.o 
537     src/http/ngx_http_core_module.c
538 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 
539     -o objs/src/http/ngx_http_special_response.o 
540     src/http/ngx_http_special_response.c
541 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 
542     -o objs/src/http/ngx_http_request.o 
543     src/http/ngx_http_request.c
544 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 
545     -o objs/src/http/ngx_http_parse.o 
546     src/http/ngx_http_parse.c
547 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 
548     -o objs/src/http/modules/ngx_http_log_module.o 
549     src/http/modules/ngx_http_log_module.c
550 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 
551     -o objs/src/http/ngx_http_request_body.o 
552     src/http/ngx_http_request_body.c
553 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 
554     -o objs/src/http/ngx_http_variables.o 
555     src/http/ngx_http_variables.c
556 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 
557     -o objs/src/http/ngx_http_script.o 
558     src/http/ngx_http_script.c
559 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 
560     -o objs/src/http/ngx_http_upstream.o 
561     src/http/ngx_http_upstream.c
562 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 
563     -o objs/src/http/ngx_http_upstream_round_robin.o 
564     src/http/ngx_http_upstream_round_robin.c
565 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 
566     -o objs/src/http/ngx_http_file_cache.o 
567     src/http/ngx_http_file_cache.c
568 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 
569     -o objs/src/http/ngx_http_write_filter_module.o 
570     src/http/ngx_http_write_filter_module.c
571 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 
572     -o objs/src/http/ngx_http_header_filter_module.o 
573     src/http/ngx_http_header_filter_module.c
574 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 
575     -o objs/src/http/modules/ngx_http_chunked_filter_module.o 
576     src/http/modules/ngx_http_chunked_filter_module.c
577 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 
578     -o objs/src/http/modules/ngx_http_range_filter_module.o 
579     src/http/modules/ngx_http_range_filter_module.c
580 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 
581     -o objs/src/http/modules/ngx_http_gzip_filter_module.o 
582     src/http/modules/ngx_http_gzip_filter_module.c
583 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 
584     -o objs/src/http/ngx_http_postpone_filter_module.o 
585     src/http/ngx_http_postpone_filter_module.c
586 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 
587     -o objs/src/http/modules/ngx_http_ssi_filter_module.o 
588     src/http/modules/ngx_http_ssi_filter_module.c
589 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 
590     -o objs/src/http/modules/ngx_http_charset_filter_module.o 
591     src/http/modules/ngx_http_charset_filter_module.c
592 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 
593     -o objs/src/http/modules/ngx_http_userid_filter_module.o 
594     src/http/modules/ngx_http_userid_filter_module.c
595 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 
596     -o objs/src/http/modules/ngx_http_headers_filter_module.o 
597     src/http/modules/ngx_http_headers_filter_module.c
598 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 
599     -o objs/src/http/ngx_http_copy_filter_module.o 
600     src/http/ngx_http_copy_filter_module.c
601 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 
602     -o objs/src/http/modules/ngx_http_not_modified_filter_module.o 
603     src/http/modules/ngx_http_not_modified_filter_module.c
604 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 
605     -o objs/src/http/modules/ngx_http_static_module.o 
606     src/http/modules/ngx_http_static_module.c
607 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 
608     -o objs/src/http/modules/ngx_http_autoindex_module.o 
609     src/http/modules/ngx_http_autoindex_module.c
610 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 
611     -o objs/src/http/modules/ngx_http_index_module.o 
612     src/http/modules/ngx_http_index_module.c
613 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 
614     -o objs/src/http/modules/ngx_http_auth_basic_module.o 
615     src/http/modules/ngx_http_auth_basic_module.c
616 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 
617     -o objs/src/http/modules/ngx_http_access_module.o 
618     src/http/modules/ngx_http_access_module.c
619 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 
620     -o objs/src/http/modules/ngx_http_limit_conn_module.o 
621     src/http/modules/ngx_http_limit_conn_module.c
622 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 
623     -o objs/src/http/modules/ngx_http_limit_req_module.o 
624     src/http/modules/ngx_http_limit_req_module.c
625 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 
626     -o objs/src/http/modules/ngx_http_geo_module.o 
627     src/http/modules/ngx_http_geo_module.c
628 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 
629     -o objs/src/http/modules/ngx_http_map_module.o 
630     src/http/modules/ngx_http_map_module.c
631 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 
632     -o objs/src/http/modules/ngx_http_split_clients_module.o 
633     src/http/modules/ngx_http_split_clients_module.c
634 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 
635     -o objs/src/http/modules/ngx_http_referer_module.o 
636     src/http/modules/ngx_http_referer_module.c
637 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 
638     -o objs/src/http/modules/ngx_http_rewrite_module.o 
639     src/http/modules/ngx_http_rewrite_module.c
640 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 
641     -o objs/src/http/modules/ngx_http_proxy_module.o 
642     src/http/modules/ngx_http_proxy_module.c
643 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 
644     -o objs/src/http/modules/ngx_http_fastcgi_module.o 
645     src/http/modules/ngx_http_fastcgi_module.c
646 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 
647     -o objs/src/http/modules/ngx_http_uwsgi_module.o 
648     src/http/modules/ngx_http_uwsgi_module.c
649 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 
650     -o objs/src/http/modules/ngx_http_scgi_module.o 
651     src/http/modules/ngx_http_scgi_module.c
652 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 
653     -o objs/src/http/modules/ngx_http_memcached_module.o 
654     src/http/modules/ngx_http_memcached_module.c
655 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 
656     -o objs/src/http/modules/ngx_http_empty_gif_module.o 
657     src/http/modules/ngx_http_empty_gif_module.c
658 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 
659     -o objs/src/http/modules/ngx_http_browser_module.o 
660     src/http/modules/ngx_http_browser_module.c
661 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 
662     -o objs/src/http/modules/ngx_http_upstream_hash_module.o 
663     src/http/modules/ngx_http_upstream_hash_module.c
664 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 
665     -o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o 
666     src/http/modules/ngx_http_upstream_ip_hash_module.c
667 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 
668     -o objs/src/http/modules/ngx_http_upstream_least_conn_module.o 
669     src/http/modules/ngx_http_upstream_least_conn_module.c
670 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 
671     -o objs/src/http/modules/ngx_http_upstream_keepalive_module.o 
672     src/http/modules/ngx_http_upstream_keepalive_module.c
673 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 
674     -o objs/src/http/modules/ngx_http_upstream_zone_module.o 
675     src/http/modules/ngx_http_upstream_zone_module.c
676 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 
677     -o objs/ngx_modules.o 
678     objs/ngx_modules.c
679 cc -o objs/nginx 
680 objs/src/core/nginx.o 
681 objs/src/core/ngx_log.o 
682 objs/src/core/ngx_palloc.o 
683 objs/src/core/ngx_array.o 
684 objs/src/core/ngx_list.o 
685 objs/src/core/ngx_hash.o 
686 objs/src/core/ngx_buf.o 
687 objs/src/core/ngx_queue.o 
688 objs/src/core/ngx_output_chain.o 
689 objs/src/core/ngx_string.o 
690 objs/src/core/ngx_parse.o 
691 objs/src/core/ngx_parse_time.o 
692 objs/src/core/ngx_inet.o 
693 objs/src/core/ngx_file.o 
694 objs/src/core/ngx_crc32.o 
695 objs/src/core/ngx_murmurhash.o 
696 objs/src/core/ngx_md5.o 
697 objs/src/core/ngx_sha1.o 
698 objs/src/core/ngx_rbtree.o 
699 objs/src/core/ngx_radix_tree.o 
700 objs/src/core/ngx_slab.o 
701 objs/src/core/ngx_times.o 
702 objs/src/core/ngx_shmtx.o 
703 objs/src/core/ngx_connection.o 
704 objs/src/core/ngx_cycle.o 
705 objs/src/core/ngx_spinlock.o 
706 objs/src/core/ngx_rwlock.o 
707 objs/src/core/ngx_cpuinfo.o 
708 objs/src/core/ngx_conf_file.o 
709 objs/src/core/ngx_module.o 
710 objs/src/core/ngx_resolver.o 
711 objs/src/core/ngx_open_file_cache.o 
712 objs/src/core/ngx_crypt.o 
713 objs/src/core/ngx_proxy_protocol.o 
714 objs/src/core/ngx_syslog.o 
715 objs/src/event/ngx_event.o 
716 objs/src/event/ngx_event_timer.o 
717 objs/src/event/ngx_event_posted.o 
718 objs/src/event/ngx_event_accept.o 
719 objs/src/event/ngx_event_connect.o 
720 objs/src/event/ngx_event_pipe.o 
721 objs/src/os/unix/ngx_time.o 
722 objs/src/os/unix/ngx_errno.o 
723 objs/src/os/unix/ngx_alloc.o 
724 objs/src/os/unix/ngx_files.o 
725 objs/src/os/unix/ngx_socket.o 
726 objs/src/os/unix/ngx_recv.o 
727 objs/src/os/unix/ngx_readv_chain.o 
728 objs/src/os/unix/ngx_udp_recv.o 
729 objs/src/os/unix/ngx_send.o 
730 objs/src/os/unix/ngx_writev_chain.o 
731 objs/src/os/unix/ngx_udp_send.o 
732 objs/src/os/unix/ngx_udp_sendmsg_chain.o 
733 objs/src/os/unix/ngx_channel.o 
734 objs/src/os/unix/ngx_shmem.o 
735 objs/src/os/unix/ngx_process.o 
736 objs/src/os/unix/ngx_daemon.o 
737 objs/src/os/unix/ngx_setaffinity.o 
738 objs/src/os/unix/ngx_setproctitle.o 
739 objs/src/os/unix/ngx_posix_init.o 
740 objs/src/os/unix/ngx_user.o 
741 objs/src/os/unix/ngx_dlopen.o 
742 objs/src/os/unix/ngx_process_cycle.o 
743 objs/src/os/unix/ngx_linux_init.o 
744 objs/src/event/modules/ngx_epoll_module.o 
745 objs/src/os/unix/ngx_linux_sendfile_chain.o 
746 objs/src/core/ngx_regex.o 
747 objs/src/http/ngx_http.o 
748 objs/src/http/ngx_http_core_module.o 
749 objs/src/http/ngx_http_special_response.o 
750 objs/src/http/ngx_http_request.o 
751 objs/src/http/ngx_http_parse.o 
752 objs/src/http/modules/ngx_http_log_module.o 
753 objs/src/http/ngx_http_request_body.o 
754 objs/src/http/ngx_http_variables.o 
755 objs/src/http/ngx_http_script.o 
756 objs/src/http/ngx_http_upstream.o 
757 objs/src/http/ngx_http_upstream_round_robin.o 
758 objs/src/http/ngx_http_file_cache.o 
759 objs/src/http/ngx_http_write_filter_module.o 
760 objs/src/http/ngx_http_header_filter_module.o 
761 objs/src/http/modules/ngx_http_chunked_filter_module.o 
762 objs/src/http/modules/ngx_http_range_filter_module.o 
763 objs/src/http/modules/ngx_http_gzip_filter_module.o 
764 objs/src/http/ngx_http_postpone_filter_module.o 
765 objs/src/http/modules/ngx_http_ssi_filter_module.o 
766 objs/src/http/modules/ngx_http_charset_filter_module.o 
767 objs/src/http/modules/ngx_http_userid_filter_module.o 
768 objs/src/http/modules/ngx_http_headers_filter_module.o 
769 objs/src/http/ngx_http_copy_filter_module.o 
770 objs/src/http/modules/ngx_http_not_modified_filter_module.o 
771 objs/src/http/modules/ngx_http_static_module.o 
772 objs/src/http/modules/ngx_http_autoindex_module.o 
773 objs/src/http/modules/ngx_http_index_module.o 
774 objs/src/http/modules/ngx_http_auth_basic_module.o 
775 objs/src/http/modules/ngx_http_access_module.o 
776 objs/src/http/modules/ngx_http_limit_conn_module.o 
777 objs/src/http/modules/ngx_http_limit_req_module.o 
778 objs/src/http/modules/ngx_http_geo_module.o 
779 objs/src/http/modules/ngx_http_map_module.o 
780 objs/src/http/modules/ngx_http_split_clients_module.o 
781 objs/src/http/modules/ngx_http_referer_module.o 
782 objs/src/http/modules/ngx_http_rewrite_module.o 
783 objs/src/http/modules/ngx_http_proxy_module.o 
784 objs/src/http/modules/ngx_http_fastcgi_module.o 
785 objs/src/http/modules/ngx_http_uwsgi_module.o 
786 objs/src/http/modules/ngx_http_scgi_module.o 
787 objs/src/http/modules/ngx_http_memcached_module.o 
788 objs/src/http/modules/ngx_http_empty_gif_module.o 
789 objs/src/http/modules/ngx_http_browser_module.o 
790 objs/src/http/modules/ngx_http_upstream_hash_module.o 
791 objs/src/http/modules/ngx_http_upstream_ip_hash_module.o 
792 objs/src/http/modules/ngx_http_upstream_least_conn_module.o 
793 objs/src/http/modules/ngx_http_upstream_keepalive_module.o 
794 objs/src/http/modules/ngx_http_upstream_zone_module.o 
795 objs/ngx_modules.o 
796 -ldl -lpthread -lcrypt -lpcre -lz 
797 -Wl,-E
798 sed -e "s|%%PREFIX%%|/usr/local/nginx|" 
799     -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" 
800     -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" 
801     -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" 
802     < man/nginx.8 > objs/nginx.8
803 make[1]: Leaving directory `/tmp/nginx-1.12.1'
804 make -f objs/Makefile install
805 make[1]: Entering directory `/tmp/nginx-1.12.1'
806 test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
807 test -d '/usr/local/nginx/sbin' 
808     || mkdir -p '/usr/local/nginx/sbin'
809 test ! -f '/usr/local/nginx/sbin/nginx' 
810     || mv '/usr/local/nginx/sbin/nginx' 
811         '/usr/local/nginx/sbin/nginx.old'
812 cp objs/nginx '/usr/local/nginx/sbin/nginx'
813 test -d '/usr/local/nginx/conf' 
814     || mkdir -p '/usr/local/nginx/conf'
815 cp conf/koi-win '/usr/local/nginx/conf'
816 cp conf/koi-utf '/usr/local/nginx/conf'
817 cp conf/win-utf '/usr/local/nginx/conf'
818 test -f '/usr/local/nginx/conf/mime.types' 
819     || cp conf/mime.types '/usr/local/nginx/conf'
820 cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
821 test -f '/usr/local/nginx/conf/fastcgi_params' 
822     || cp conf/fastcgi_params '/usr/local/nginx/conf'
823 cp conf/fastcgi_params 
824     '/usr/local/nginx/conf/fastcgi_params.default'
825 test -f '/usr/local/nginx/conf/fastcgi.conf' 
826     || cp conf/fastcgi.conf '/usr/local/nginx/conf'
827 cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'
828 test -f '/usr/local/nginx/conf/uwsgi_params' 
829     || cp conf/uwsgi_params '/usr/local/nginx/conf'
830 cp conf/uwsgi_params 
831     '/usr/local/nginx/conf/uwsgi_params.default'
832 test -f '/usr/local/nginx/conf/scgi_params' 
833     || cp conf/scgi_params '/usr/local/nginx/conf'
834 cp conf/scgi_params 
835     '/usr/local/nginx/conf/scgi_params.default'
836 test -f '/usr/local/nginx/conf/nginx.conf' 
837     || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'
838 cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
839 test -d '/usr/local/nginx/logs' 
840     || mkdir -p '/usr/local/nginx/logs'
841 test -d '/usr/local/nginx/logs' 
842     || mkdir -p '/usr/local/nginx/logs'
843 test -d '/usr/local/nginx/html' 
844     || cp -R html '/usr/local/nginx'
845 test -d '/usr/local/nginx/logs' 
846     || mkdir -p '/usr/local/nginx/logs'
847 make[1]: Leaving directory `/tmp/nginx-1.12.1'
848  ---> 06a1f20e0b55
849 Removing intermediate container 048ad6f78b44
850 Step 6/10 : RUN rm -rf /tmp/nginx-1.12.1* && yum clean all
851  ---> Running in db9cd26f369a
852 Loaded plugins: fastestmirror, ovl
853 Cleaning repos: base extras updates
854 Cleaning up everything
855 Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
856 Cleaning up list of fastest mirrors
857  ---> 490b07a321e8
858 Removing intermediate container db9cd26f369a
859 Step 7/10 : COPY nginx.conf /usr/local/nginx/conf
860  ---> c14178e9bacb
861 Step 8/10 : WORKDIR /usr/local/nignx
862  ---> f5371521ecf3
863 Removing intermediate container 153b3472125d
864 Step 9/10 : EXPOSE 80
865  ---> Running in 0591f916b6cc
866  ---> e68d670c52c3
867 Removing intermediate container 0591f916b6cc
868 Step 10/10 : CMD ./sbin/nginx -g daemon off;
869  ---> Running in 07fc02543335
870  ---> 66243306e10f
871 Removing intermediate container 07fc02543335
872 Successfully built 66243306e10f
873 Successfully tagged nginx:v1

精简步骤如下

[root@centos05 nginx]# docker build -t nginx:v1 .
Sending build context to Docker daemon 985.6kB
Step 1/10 : FROM centos:7
---> ff426288ea90
Step 2/10 : MAINTAINER 1335120568@qq.com
---> Using cache
---> 936bb93a1c1e
Step 3/10 : RUN yum install -y gcc gcc-c++ make openssl-devel pcre-devel
---> Using cache
---> 47148001540c
Step 4/10 : ADD nginx-1.12.1.tar.gz /tmp
---> Using cache
---> df7b9c12d4c3
Step 5/10 : RUN cd /tmp/nginx-1.12.1 && ./configure --prefix=/usr/local/nginx && make && make install
---> Using cache
---> be894e2b22c5
Step 6/10 : RUN rm -rf /tmp/nginx-1.12.1* && yum clean all
---> Using cache
---> 388f2ddd833f
Step 7/10 : COPY nginx.conf /usr/local/nginx/conf/
---> c1a4e51e07b1
Step 8/10 : WORKDIR /usr/local/nignx
---> 88478cd55e90
Removing intermediate container bbdebfc2987c
Step 9/10 : EXPOSE 80
---> Running in cf09ebac583c
---> 64bd2315ca9a
Removing intermediate container cf09ebac583c
Step 10/10 : CMD /usr/local/nginx/sbin/nginx -g daemon off;
---> Running in 2ca6fc47bedb
---> 851d8c049e80
Removing intermediate container 2ca6fc47bedb
Successfully built 851d8c049e80
Successfully tagged nginx:v1

[root@centos05 ~]# docker container run -itd --name nginx1 -p 99:80 nginx:v1
778176e7bc7ff73bc7aa7cfbd4f09188e7bd754196b588c6b8abfc161ff0762b
[root@centos05 ~]# 
[root@centos05 ~]# docker container exec -it nginx1 bash
[root@778176e7bc7f nignx]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 02:27 pts/0    00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -g daemon off;
root         5     1  0 02:27 pts/0    00:00:00 nginx: worker process
root         6     0  1 02:27 pts/1    00:00:00 bash
root        18     6  0 02:27 pts/1    00:00:00 ps -ef
[root@778176e7bc7f nignx]# curl 127.0.0.1
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
         35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@778176e7bc7f nignx]# exit
exit
[root@centos05 ~]# docker ps 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                NAMES
778176e7bc7f        nginx:v1            "/usr/local/nginx/..."   32 seconds ago      Up 31 seconds       0.0.0.0:99->80/tcp   nginx1

 4、浏览器访问测试

5、配置文件如下

 1 [root@centos05 nginx]# cat Dockerfile 
 2 FROM centos:7
 3 MAINTAINER  1335120568@qq.com
 4 RUN yum  install -y gcc gcc-c++ make openssl-devel  pcre-devel
 5 ADD nginx-1.12.1.tar.gz /tmp
 6 
 7 RUN cd /tmp/nginx-1.12.1 && 
 8     ./configure --prefix=/usr/local/nginx && 
 9     make && make install
10 
11 
12 RUN  rm -rf /tmp/nginx-1.12.1* && yum clean all
13 
14 COPY  nginx.conf  /usr/local/nginx/conf/
15 
16 WORKDIR  /usr/local/nignx
17 
18 EXPOSE  80
19 
20 CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
21 
22 [root@centos05 nginx]# 
23 [root@centos05 nginx]# cat nginx.conf 
24 user  root; 
25 worker_processes  auto; 
26 
27 error_log  logs/error.log  info;
28 
29 pid        logs/nginx.pid; 
30 
31 
32 events {
33     use epoll; 
34 }
35 
36 http {
37 
38     include       mime.types;
39     default_type  application/octet-stream;
40 
41     log_format  main '$remote_addr - $remote_user [$time_local] "$request" '
42                       '$status $body_bytes_sent "$http_referer" '
43                       '"$http_user_agent" "$http_x_forwarded_for"';
44 
45     access_log logs/access.log main;
46     sendfile        on;
47     keepalive_timeout  65;
48 
49     server {
50         listen 80;
51         server_name localhost;
52         root html;
53         index index.html index.php;
54 
55         location ~ .php$ {
56             root html;
57             fastcgi_pass 127.0.0.1:9000;
58             #fastcgi_pass lnmp_php:9000;
59             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
60             include fastcgi_params;
61         }
62     }
63 }
原文地址:https://www.cnblogs.com/hellojackyleon/p/8327851.html