Closed Hecbi closed 4 years ago
root@iZ2ze72ujoo5ubiog2nr4rZ:~# docker -v
Docker version 18.09.7, build 2d0083d
升级 Docker 到最新版 19.03.5 后重试看看。
问题依旧存在
root@iZ2ze72ujoo5ubiog2nr4rZ:~# docker run -d --privileged -p 500:500/udp -p 4500:4500/udp --name l2tp --restart=always --env-file /etc/l2tp.env -v /lib/modules:/lib/modules teddysun/l2tp
16ea7a7da135bd3ad1039478e1a98e7651a6508b5dd069d1796a2b55391f11a3
root@iZ2ze72ujoo5ubiog2nr4rZ:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
16ea7a7da135 teddysun/l2tp "l2tp" 2 seconds ago Restarting (1) Less than a second ago l2tp
root@iZ2ze72ujoo5ubiog2nr4rZ:~# docker logs 16ea7a7da135
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
Error: Environment variables must be specified. please edit your environment file and retry again.
root@iZ2ze72ujoo5ubiog2nr4rZ:~# docker -v
Docker version 19.03.5, build 633a0ea838
报错信息显示是无法读取环境变量的配置文件,请确保 /etc/l2tp.env 的文件内容正确。以及该文件能在 Linux 下被正常读取。 如果你是在 Windows 系统里编辑后上传至VPS的,则需要修正换行符的问题。
启动命令
docker run -d --privileged -p 500:500/udp -p 4500:4500/udp --env-file=/tmp/l2tp.env -v /lib/modules:/lib/modules teddysun/l2t p
/tmp/l2tp.env 文件内容
接下来无法启动