very tiny nginx from alpine,only 6.2MB
3.4K
static build nginx
nginx version 1.13.9
FROM suconghou/nginx
ADD . .
RUN cp nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
https://github.com/suconghou/docker/tree/master/nginx
Docker image https://hub.docker.com/r/suconghou/nginx/
static build
在运行 make之前
修改objs/Makefile文件, 搜索link关键字, 在 link objs/nginx 的时候补充上 -static参数静态编译
objs/ngx_modules.o -static \
for nginx:busybox can be run use nginx -g "user root root;"
因为 busybox 里面没有nobody组,执行addgroup nobody添加组后也可以直接运行。
Content type
Image
Digest
Size
4.5 MB
Last updated
almost 5 years ago
docker pull suconghou/nginx