v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.28k stars 8.94k forks source link

docker :About an hour ago Exited (23) 4 seconds ago #1611

Closed hktalent closed 5 years ago

hktalent commented 5 years ago
docker run -d --name v2ray -v /etc/v2ray:/etc/v2ray -p 8888:53 v2ray/official  v2ray -config=/root/s.json

# docker start a7879757fd61
a7879757fd61

docker ps -a
a7879757fd61        v2ray/official                     "v2ray -config=/root…"   About an hour ago   Exited (23) 4 seconds ago                       v2r
hktalent commented 5 years ago

搞定

docker run -d --name v2ray -v /etc/v2ray:/etc/v2ray -p 53:53 v2ray/official  v2ray -config=/etc/v2ray/config.json

必须是:/etc/v2ray/config.json

hktalent commented 5 years ago
docker pull v2ray/official
docker ps -a |grep v2ray|awk '{print $1}'|xargs -I % bash -c "docker stop %;docker rm %"
docker run -d --name v2ray -v /etc/v2ray:/etc/v2ray -p 53:53 v2ray/official  v2ray -config=/etc/v2ray/config.json