mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-24 05:17:06 +02:00
update
This commit is contained in:
parent
1eab8a8d51
commit
19e34e276d
@ -6,6 +6,10 @@ FROM debian:jessie
|
||||
MAINTAINER kev <noreply@datageek.inf>
|
||||
|
||||
ENV NETNAME netname
|
||||
ENV PIDFILE /runt/tinc.$NETNAME.pid
|
||||
ENV VERBOSE 2
|
||||
ENV ADDRESS 10.0.0.1
|
||||
ENV NETMASK 255.255.255.0
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y net-tools tinc \
|
||||
@ -14,17 +18,18 @@ RUN apt-get update \
|
||||
|
||||
WORKDIR /etc/tinc/$NETNAME
|
||||
|
||||
RUN /bin/echo -e 'Name=server\nAddressFamily=ipv4\nInterface=tun0' > tinc.conf \
|
||||
&& /bin/echo -e 'Subnet=10.0.0.1\nSubnet=0.0.0.0/0' > hosts/server \
|
||||
&& /bin/echo -e '\n' | tincd -n $NETNAME -K4096 \
|
||||
&& /bin/echo -e 'ifconfig $INTERFACE 10.0.0.1 netmask 255.255.255.0' > tinc-up \
|
||||
&& /bin/echo -e 'ifconfig $INTERFACE down' > tinc-down \
|
||||
RUN /bin/echo -e "Name=server\\nAddressFamily=ipv4\\nInterface=tun0" > tinc.conf \
|
||||
&& /bin/echo -e "Subnet=$ADDRESS\\nSubnet=0.0.0.0/0" > hosts/server \
|
||||
&& /bin/echo -e "\\n" | tincd -n $NETNAME -K4096 \
|
||||
&& /bin/echo -e "ifconfig \$INTERFACE $ADDRESS netmask $NETMASK" > tinc-up \
|
||||
&& /bin/echo -e "ifconfig \$INTERFACE down" > tinc-down \
|
||||
&& chmod +x tinc-up tinc-down
|
||||
|
||||
VOLUME /etc/tinc
|
||||
EXPOSE 655/udp
|
||||
|
||||
CMD tincd --no-detach \
|
||||
--debug 3 \
|
||||
--net $NETNAME \
|
||||
--pidfile /run/tinc.$NETNAME.pid
|
||||
--pidfile $PIDFILE \
|
||||
--debug $VERBOSE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user