|
1 | | -FROM deis/base:latest |
2 | | -MAINTAINER OpDemand <info@opdemand.com> |
| 1 | +FROM ubuntu:14.04 |
3 | 2 |
|
4 | | -RUN apt-get update && \ |
5 | | - apt-get install -yq patch libpcre3 libpcre3-dev libssl-dev libgeoip-dev |
| 3 | +ENV DEBIAN_FRONTEND noninteractive |
| 4 | + |
| 5 | +# install common packages |
| 6 | +RUN apt-get update && apt-get install -y curl |
6 | 7 |
|
7 | | -RUN wget -q http://nginx.org/download/nginx-1.6.2.tar.gz -O /tmp/nginx-1.6.2.tar.gz |
8 | | -RUN wget -q https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/v0.4.5.tar.gz -O /tmp/tcp-proxy.tar.gz |
| 8 | +# install etcdctl |
| 9 | +RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \ |
| 10 | + && chmod +x /usr/local/bin/etcdctl |
9 | 11 |
|
10 | | -WORKDIR /tmp |
11 | | -RUN tar -xzf nginx-1.6.2.tar.gz |
12 | | -RUN tar -xzf tcp-proxy.tar.gz |
| 12 | +# install confd |
| 13 | +RUN curl -sSL -o /usr/local/bin/confd https://s3-us-west-2.amazonaws.com/opdemand/confd-v0.5.0-json \ |
| 14 | + && chmod +x /usr/local/bin/confd |
| 15 | + |
| 16 | +# install build and runtime packages |
| 17 | +RUN apt-get update && \ |
| 18 | + apt-get install -yq patch libpcre3 libpcre3-dev libssl-dev libgeoip-dev gcc make |
13 | 19 |
|
14 | | -WORKDIR /tmp/nginx-1.6.2 |
15 | | -RUN patch -p1 < /tmp/nginx_tcp_proxy_module-0.4.5/tcp.patch |
16 | | -RUN ./configure --prefix=/var/lib/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_spdy_module --with-http_sub_module --with-mail --with-mail_ssl_module --add-module=/tmp/nginx_tcp_proxy_module-0.4.5 |
17 | | -RUN make && make install |
| 20 | +# build nginx+tcp_proxy from source |
| 21 | +RUN curl -sSL http://nginx.org/download/nginx-1.6.2.tar.gz | tar -C /tmp -xz |
| 22 | +RUN curl -sSL https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/v0.4.5.tar.gz | tar -C /tmp -xz |
| 23 | +RUN cd /tmp/nginx-1.6.2 \ |
| 24 | + && patch -p1 < /tmp/nginx_tcp_proxy_module-0.4.5/tcp.patch \ |
| 25 | + && ./configure \ |
| 26 | + --prefix=/var/lib/nginx \ |
| 27 | + --sbin-path=/usr/sbin/nginx \ |
| 28 | + --conf-path=/etc/nginx/nginx.conf \ |
| 29 | + --http-log-path=/var/log/nginx/access.log \ |
| 30 | + --error-log-path=/var/log/nginx/error.log \ |
| 31 | + --lock-path=/var/lock/nginx.lock \ |
| 32 | + --pid-path=/run/nginx.pid \ |
| 33 | + --http-client-body-temp-path=/var/lib/nginx/body \ |
| 34 | + --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ |
| 35 | + --http-proxy-temp-path=/var/lib/nginx/proxy \ |
| 36 | + --http-scgi-temp-path=/var/lib/nginx/scgi \ |
| 37 | + --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ |
| 38 | + --with-debug \ |
| 39 | + --with-pcre-jit \ |
| 40 | + --with-ipv6 \ |
| 41 | + --with-http_ssl_module \ |
| 42 | + --with-http_stub_status_module \ |
| 43 | + --with-http_realip_module \ |
| 44 | + --with-http_auth_request_module \ |
| 45 | + --with-http_addition_module \ |
| 46 | + --with-http_dav_module \ |
| 47 | + --with-http_geoip_module \ |
| 48 | + --with-http_gzip_static_module \ |
| 49 | + --with-http_spdy_module \ |
| 50 | + --with-http_sub_module \ |
| 51 | + --with-mail \ |
| 52 | + --with-mail_ssl_module \ |
| 53 | + --add-module=/tmp/nginx_tcp_proxy_module-0.4.5 \ |
| 54 | + && make && make install |
18 | 55 |
|
19 | 56 | WORKDIR /app |
20 | 57 | EXPOSE 80 2222 |
|
0 commit comments