very tiny nginx from alpine,only 6.2MB
2.5K
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
sha256:7d47bf3cf…
Size
6.1 MB
Last updated
over 2 years ago
docker pull suconghou/nginx:flv