mirror of
https://github.com/vimagick/dockerfiles.git
synced 2026-01-04 12:05:02 +01:00
add pptp-arm
This commit is contained in:
14
pptp/arm/Dockerfile
Normal file
14
pptp/arm/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Dockerfile for pptp-arm
|
||||
#
|
||||
|
||||
FROM easypi/alpine-arm:edge
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN apk add --no-cache \
|
||||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
|
||||
pptpclient
|
||||
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
10
pptp/arm/docker-compose.yml
Normal file
10
pptp/arm/docker-compose.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
pptp:
|
||||
image: easypi/pptp-arm
|
||||
environment:
|
||||
- SERVER=192.168.31.222
|
||||
- TUNNEL=vps
|
||||
- USERNAME=username
|
||||
- PASSWORD=password
|
||||
net: host
|
||||
privileged: yes
|
||||
restart: unless-stopped
|
||||
25
pptp/arm/docker-entrypoint.sh
Executable file
25
pptp/arm/docker-entrypoint.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat > /etc/ppp/peers/${TUNNEL} <<_EOF_
|
||||
pty "pptp ${SERVER} --nolaunchpppd"
|
||||
name "${USERNAME}"
|
||||
password "${PASSWORD}"
|
||||
remotename PPTP
|
||||
require-mppe-128
|
||||
file /etc/ppp/options.pptp
|
||||
ipparam "${TUNNEL}"
|
||||
_EOF_
|
||||
|
||||
cat > /etc/ppp/ip-up <<"_EOF_"
|
||||
#!/bin/sh
|
||||
ip route add 0.0.0.0/1 dev $1
|
||||
ip route add 128.0.0.0/1 dev $1
|
||||
_EOF_
|
||||
|
||||
cat > /etc/ppp/ip-down <<"_EOF_"
|
||||
#!/bin/sh
|
||||
ip route del 0.0.0.0/1 dev $1
|
||||
ip route del 128.0.0.0/1 dev $1
|
||||
_EOF_
|
||||
|
||||
exec pon ${TUNNEL} debug dump logfd 2 nodetach persist "$@"
|
||||
Reference in New Issue
Block a user