Skip to content

Instantly share code, notes, and snippets.

@pearofducks
Last active August 29, 2015 14:05
Show Gist options
  • Save pearofducks/b26e55f762c864527177 to your computer and use it in GitHub Desktop.
Save pearofducks/b26e55f762c864527177 to your computer and use it in GitHub Desktop.
kaia alpha
FROM debian:wheezy
# phusion/baseimage:0.9.12
ENV HOME /root
WORKDIR /root
RUN apt-get update && apt-get install -y build-essential libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev wget git
RUN wget http://nginx.org/download/nginx-1.6.1.tar.gz && tar xf nginx-1.6.1.tar.gz && git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git
RUN cd nginx-1.6.1 && patch -p1 < ../nginx_tcp_proxy_module/tcp.patch
RUN cd nginx-1.6.1 && ./configure --add-module=../nginx_tcp_proxy_module --prefix=/nginx && make && make install
RUN apt-get purge -y build-essential wget git && apt-get clean autoclean && apt-get autoremove -y
RUN rm -rf nginx-1.6.1 nginx-1.6.1.tar.gz nginx_tcp_proxy_module
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/{apt,dpkg,cache,log}/
VOLUME ["/external"]
http {
include /nginx/conf/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server { listen 80; server_name x.d.qck.cm;
location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://172.17.0.29; }
}
}
tcp {
upstream x_ssh { server 172.17.0.29:22; }
server { listen 22; server_name x.d.qck.cm; proxy_pass x_ssh; }
upstream x_nine { server 172.17.0.29:9999; }
server { listen 22; server_name x.d.qck.cm; proxy_pass x_nine; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment