Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot startup v2ray service due to wrong CMD in Dockerfile #3

Closed
mia0x75 opened this issue May 2, 2024 · 1 comment
Closed

Cannot startup v2ray service due to wrong CMD in Dockerfile #3

mia0x75 opened this issue May 2, 2024 · 1 comment

Comments

@mia0x75
Copy link

mia0x75 commented May 2, 2024

Error log from docker container:

[2K1Panel-localv2ray-cEBN  | Usage of /usr/bin/v2ray:
[2K1Panel-localv2ray-cEBN  | flag provided but not defined: -config

From Dockerfile we can see the startup CMD

CMD [ "/usr/bin/v2ray", "-config", "/etc/v2ray/config.json" ]

From v2ray official document, V2Ray has the following commandline parameters:

v2ray [-version] [-test] [-config=config.json] [-format=json]

so the corrent CMD should be as listed below

CMD [ "/usr/bin/v2ray", "run", "-config=/etc/v2ray/config.json" ]

After I add the following line into docker-compose.yml, the container runs normally.

command: "/usr/bin/v2ray run -config=/etc/v2ray/config.json"
@zydou
Copy link
Owner

zydou commented May 2, 2024

Thank you for your reminder. The syntax CMD [ "/usr/bin/v2ray", "-config", "/etc/v2ray/config.json" ] is suitable for the v2ray v4.x version, while the syntax you referred to is intended for the new v5.x version. I will fix it after the vacation.

@zydou zydou closed this as completed in 2be6f96 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants