File tree Expand file tree Collapse file tree 5 files changed +79
-8
lines changed Expand file tree Collapse file tree 5 files changed +79
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ build
Original file line number Diff line number Diff line change 1+ #
2+ # Openresty dockerfile
3+ #
4+ # This docker contains openresty (nginx) compiled from source with useful optional modules installed.
5+ #
6+ # http://github.com/marclennox/docker-images/openresty
7+ #
8+
9+ # Pull base image.
10+ FROM debian:jessie
11+
12+ MAINTAINER Marc Lennox <
[email protected] >
13+
14+ # Set environment.
15+ ENV DEBIAN_FRONTEND noninteractive
16+
17+ # Install packages.
18+ RUN apt-get update
19+ RUN apt-get install -y build-essential curl libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl wget
20+
21+ # Compile pcre from source.
22+ RUN \
23+ wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz && \
24+ tar zxvf pcre-*.tar.gz && \
25+ rm -f pcre-*.tar.gz && \
26+ cd pcre-* && \
27+ ./configure && \
28+ make && \
29+ make install && \
30+ make clean && \
31+ cd .. && \
32+ rm -rf pcre-* && \
33+ ln -s /usr/local/lib/libpcre.so.1 /lib64
34+
35+ # Compile openresty from source.
36+ RUN \
37+ wget http://openresty.org/download/ngx_openresty-1.7.2.1.tar.gz && \
38+ tar -xzvf ngx_openresty-*.tar.gz && \
39+ rm -f ngx_openresty-*.tar.gz && \
40+ cd ngx_openresty-* && \
41+ ./configure && \
42+ make && \
43+ make install && \
44+ make clean && \
45+ cd .. && \
46+ rm -rf ngx_openresty-* && \
47+ ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx
48+
49+ # Add files to the container.
50+ ADD ./script/ /usr/local/bin
51+
52+ # Expose volumes.
53+ VOLUME ["/etc/nginx" ]
54+
55+ # Set the working directory.
56+ WORKDIR /etc/nginx
57+
58+ # Set the entrypoint script.
59+ ENTRYPOINT ["docker-entrypoint" ]
60+
61+ # Define the default command.
62+ CMD ["nginx" , "-c" , "/etc/nginx/nginx.conf" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd ) "
4+ cd " ${SCRIPT_DIR} " && docker build --tag=" marclennox/openresty" .
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Copy a default configuration into place if not present
5+ if ! [ " $( ls -A .) " ]; then
6+ cp -upR " /usr/local/openresty/nginx/conf/." " /etc/nginx/"
7+ echo " daemon off;" >> " /etc/nginx/nginx.conf"
8+ fi
9+
10+ command=" $@ "
11+
12+ ${command}
You can’t perform that action at this time.
0 commit comments