Public Repository

Last pushed: 15 days ago
Short Description
very tiny nginx from alpine,only 6.2MB
Full Description

nginx

static build nginx

nginx version 1.13.9

Usage

FROM suconghou/nginx
ADD . .
RUN cp nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]

Dockerfile

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添加组后也可以直接运行。

Docker Pull Command
Owner
suconghou