2020-01-20 22:52:03 +09:00
|
|
|
# Dockerfile for L2TP/IPSec VPN Server based alpine
|
|
|
|
# Copyright (C) 2018 - 2020 Teddysun <i@teddysun.com>
|
|
|
|
|
|
|
|
FROM --platform=$TARGETPLATFORM alpine:edge
|
|
|
|
LABEL maintainer="Teddysun <i@teddysun.com>"
|
|
|
|
|
2020-05-31 22:33:02 +09:00
|
|
|
RUN apk add --no-cache ca-certificates bash openssl libreswan xl2tpd \
|
2020-01-20 22:52:03 +09:00
|
|
|
&& ipsec initnss \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
COPY ipsec /etc/init.d/ipsec
|
|
|
|
COPY l2tp.sh /usr/bin/l2tp
|
|
|
|
COPY l2tpctl.sh /usr/bin/l2tpctl
|
|
|
|
RUN chmod 755 /etc/init.d/ipsec /usr/bin/l2tp /usr/bin/l2tpctl
|
|
|
|
|
|
|
|
VOLUME /lib/modules
|
|
|
|
|
|
|
|
EXPOSE 500/udp 4500/udp
|
|
|
|
|
|
|
|
CMD [ "l2tp" ]
|