/
Dockerfile
40 lines (35 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Pull in base image
FROM vrtsystems/baseimage:0.4.0
MAINTAINER Yifei Zhou <evianzhow@gmail.com>
LABEL authors="VRT Engineering, Yifei Zhou"
# Update repostory cache and install dependencies for sniproxy
# For reasons unknown, a deb package is not provided by Debian.
RUN apt-get update \
&& apt-get -y install cdbs debhelper dh-autoreconf autotools-dev \
gettext pkg-config libev-dev libpcre3-dev libudns-dev \
build-essential wget dpkg-dev fakeroot devscripts \
&& echo "=== Retrieving package =================" \
&& wget -O /tmp/sniproxy_0.6.0.tar.gz \
https://github.com/dlundquist/sniproxy/archive/0.6.0.tar.gz \
&& echo "=== Building package ===================" \
&& ( cd /tmp && tar -xzvf sniproxy_0.6.0.tar.gz \
&& cd /tmp/sniproxy-0.6.0 \
&& ./autogen.sh \
&& dpkg-buildpackage -us -uc -b ) \
&& echo "=== Installing package =================" \
&& dpkg -i /tmp/*.deb \
&& echo "=== Cleaning up ========================" \
&& rm -fr /tmp/sniproxy* \
&& apt-get purge -y debhelper dh-autoreconf autotools-dev wget dpkg-dev \
pkg-config libev-dev libpcre3-dev libudns-dev build-essential \
devscripts \
&& /usr/local/sbin/docker-cleanup.sh
# Expose ports for sniproxy
EXPOSE 443/tcp
EXPOSE 80/tcp
# Copy configuration generator script
COPY runsniproxy.sh /usr/local/sbin/runsniproxy.sh
# Copy supervisord configuration for sniproxy
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Command to run when starting the container
CMD ["supervisord"]