Skip to content

Commit

Permalink
Support directory style OpenVPN configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kizzx2 committed Feb 26, 2016
1 parent 7a18c81 commit ea8b231
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
# Note that the config must have embedded certs
# See `start` in same repo for more ideas

FROM alpine:edge
FROM alpine

ADD sockd.sh /usr/local/bin/

RUN true \
&& echo "http:https://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update-cache dante-server openvpn \
&& apk add --update-cache dante-server openvpn bash openresolv openrc \
&& rm -rf /var/cache/apk/* \
&& chmod a+x /usr/local/bin/sockd.sh \
&& true

ADD sockd.conf /etc/

ENTRYPOINT [ \
"openvpn", \
"--up", "/usr/local/bin/sockd.sh", \
"--script-security", "2", \
"--config", "/ovpn.conf"]
"/bin/bash", "-c", \
"cd /etc/openvpn && /usr/sbin/openvpn --config *.conf --up /usr/local/bin/sockd.sh" \
]
6 changes: 3 additions & 3 deletions sockd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
/etc/openvpn/up.sh "$@"
exec /usr/sbin/sockd -D
[ -f /etc/openvpn/up.sh ] && /etc/openvpn/up.sh "$@"
/usr/sbin/sockd -D

0 comments on commit ea8b231

Please sign in to comment.