Sign inSign up

imocence/l2tp-alpine

By imocence

•Updated about 4 years ago

Based on alpine:3.15.0 mirror build L2TP VPN

Image
0

243

imocence/l2tp-alpine repository overview

⁠Use Dockerfile file content

# Base image
FROM alpine:3.15.0

# Image creator
MAINTAINER imocence

# Set the system coding
ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 TZ=Asia/Shanghai

RUN echo -e  'http://mirrors.aliyun.com/alpine/v3.15/main/\nhttp://mirrors.aliyun.com/alpine/v3.15/community/' > /etc/apk/repositories \
&& apk add -U tzdata openssl openrc libreswan xl2tpd && ln -s /usr/share/zoneinfo/${TZ} /etc/localtime \
&& ipsec initnss && rm -rf /var/cache/apk/* /tmp/* 

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"]

⁠Use docker-compose.yml file content

version: '2'
services:
  web:
    image: imocence/l2tp-alpine:v4.6
    container_name: l2tp
    network_mode: bridge
    environment:
      - VPN_USER=vpn
    ports:
      - "0.0.0.0:500:500/udp"
      - "0.0.0.0:4500:4500/udp"
    volumes:
      - ./modules:/lib/modules
    privileged: true
    restart: unless-stopped

Tag summary

Content type

Image

Digest

sha256:4cecd4885…

Size

16.9 MB

Last updated

about 4 years ago

docker pull imocence/l2tp-alpine:v4.7