Skip to content

Commit fd40631

Browse files
committed
ref(router): use ubuntu:14.04 as Dockerfile base image
1 parent 49cf60a commit fd40631

2 files changed

Lines changed: 56 additions & 25 deletions

File tree

router/Dockerfile

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,57 @@
1-
FROM deis/base:latest
2-
MAINTAINER OpDemand <info@opdemand.com>
1+
FROM ubuntu:14.04
32

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
67

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
911

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
1319

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
1855

1956
WORKDIR /app
2057
EXPOSE 80 2222

router/README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@
22

33
An nginx proxy for use in the [Deis](http://deis.io) open source PaaS.
44

5-
[![image](https://d207aa93qlcgug.cloudfront.net/img/icons/framed-icon-checked-repository.svg)](https://index.docker.io/u/deis/router/)
5+
This Docker image is based on the official
6+
[ubuntu:14.04](https://registry.hub.docker.com/_/ubuntu/) image.
67

7-
[**Trusted Build**](https://index.docker.io/u/deis/router/)
8-
9-
This Docker image is based on the trusted build
10-
[deis/base](https://index.docker.io/u/deis/base/), which itself is based
11-
on the official [ubuntu:12.04](https://index.docker.io/_/ubuntu/) image.
12-
13-
Please add any issues you find with this software to the
14-
[Deis project](https://github.com/deis/deis/issues).
8+
Please add any [issues](https://github.com/deis/deis/issues) you find with this software to
9+
the [Deis Project](https://github.com/deis/deis).
1510

1611
## Usage
1712

18-
* `make build` builds the *deis/router* image inside a vagrant VM
19-
* `make run` installs and starts *deis/router*, then displays log
20-
output from the container
13+
Please consult the [Makefile](Makefile) for current instructions on how to build, test, push,
14+
install, and start **deis/router**.
2115

2216
## Environment Variables
2317

0 commit comments

Comments
 (0)