-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
79 lines (63 loc) · 2.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
ARG IPTABLES_VER=1.8.0
ARG ZLIB_VER=1.3.1
ARG IODINE_VER=0.8.0
FROM spritsail/debian-builder:stable as builder
ARG IPTABLES_VER
ARG ZLIB_VER
ARG IODINE_VER
WORKDIR /tmp/iptables
RUN apt-get -y update \
&& apt-get -y install libmnl-dev libnftnl-dev bison flex zlib1g-dev tree \
&& curl -q "http://ftp.netfilter.org/pub/iptables/iptables-${IPTABLES_VER}.tar.bz2" | \
tar xj --strip-components=1 \
&& ./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--disable-dependency-tracking \
--without-kernel \
--disable-shared \
--disable-nftables \
--disable-connlabel \
--disable-libipq \
--disable-bnf-compiler \
--disable-nfsynproxy \
&& make \
&& DESTDIR="$PWD/out" make install \
&& mkdir -p /output/usr/lib /output/run \
#Run directory fixes spritsail/iodine issue #9
&& mv "out/usr/bin/" /output/usr/bin/
WORKDIR /tmp/zlib
RUN curl -fsSL "https://github.com/madler/zlib/archive/v${ZLIB_VER}.tar.gz" | \
tar xz --strip-components=1 \
&& ./configure \
--prefix=/usr \
--libdir=/usr/lib \
&& make \
&& DESTDIR="$PWD/out" make install \
&& find out/usr/lib -name 'libz.so*' -exec mv {} /output/usr/lib \;
WORKDIR /tmp/iodine
RUN curl -fsSL "https://code.kryo.se/iodine/iodine-${IODINE_VER}.tar.gz" | \
tar xz --strip-components=1 \
&& make \
&& mv bin/iodine* /output/usr/bin
ADD start.sh /output/usr/local/bin/start-iodined
RUN chmod +x /output/usr/local/bin/start-iodined
#===============
FROM spritsail/busybox
ARG IODINE_VER
ARG ZLIB_VER
ARG IPTABLES_VER
LABEL maintainer="Spritsail <[email protected]>" \
org.label-schema.vendor="Spritsail" \
org.label-schema.name="Iodine" \
org.label-schema.url="http://code.kryo.se/iodine/" \
org.label-schema.description="Tunnel IPv4 data over DNS" \
org.label-schema.version=${IODINE_VER} \
io.spritsail.version.iodine=${IODINE_VER} \
io.spritsail.version.zlib=${ZLIB_VER} \
io.spritsail.version.iptables=${IPTABLES_VER}
COPY --from=builder /output/ /
EXPOSE 53/udp
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/local/bin/start-iodined"]