-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM yano3/nginx-ngx_mruby:1.17.0-ngx_mruby2.1.4 | ||
|
||
ENV NGINX_VERSION=1.17.0 | ||
ENV NGX_SMALL_LIGHT_VERSION=0.9.2 | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \ | ||
git \ | ||
curl \ | ||
build-essential \ | ||
rake \ | ||
bison \ | ||
libssl-dev \ | ||
libpcre3-dev \ | ||
zlib1g-dev \ | ||
libmagickwand-dev \ | ||
\ | ||
&& apt-mark manual libmagickwand-6.q16-3 \ | ||
&& cd /usr/local/src \ | ||
&& git clone --branch v$NGX_SMALL_LIGHT_VERSION --depth 1 https://github.com/cubicdaiya/ngx_small_light.git \ | ||
&& curl -s -OL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && tar -xf nginx-$NGINX_VERSION.tar.gz \ | ||
\ | ||
&& cd /usr/local/src/ngx_small_light \ | ||
&& ./setup \ | ||
\ | ||
&& cd /usr/local/src/nginx-$NGINX_VERSION \ | ||
&& ./configure \ | ||
--with-compat \ | ||
--add-dynamic-module=../ngx_small_light \ | ||
&& make modules \ | ||
&& cp -p ./objs/*.so /etc/nginx/modules/ \ | ||
\ | ||
&& cd / \ | ||
&& rm -rf /usr/local/src/* \ | ||
&& apt-get remove --purge -y \ | ||
&& apt-get remove --purge --auto-remove -y \ | ||
git \ | ||
curl \ | ||
build-essential \ | ||
rake \ | ||
bison \ | ||
libssl-dev \ | ||
libpcre3-dev \ | ||
zlib1g-dev \ | ||
libmagickwand-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
user nginx; | ||
worker_processes 1; | ||
|
||
load_module modules/ndk_http_module.so; | ||
load_module modules/ngx_http_mruby_module.so; | ||
load_module modules/ngx_http_small_light_module.so; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
#gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
} |