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

Add v2ray-plugin Docker image example #662

Merged
merged 1 commit into from
Oct 31, 2021
Merged

Conversation

realies
Copy link
Contributor

@realies realies commented Oct 31, 2021

If this is to go into the Docker image release workflow, it needs to pull the correct architecture version of the plugin.

@zonyitoo zonyitoo merged commit fc3696e into shadowsocks:master Oct 31, 2021
@realies realies deleted the patch-1 branch October 31, 2021 17:18
@realies
Copy link
Contributor Author

realies commented Oct 31, 2021

@zonyitoo, should the v2ray-plugin be added in the current Docker image or as a separate tag?

@zonyitoo
Copy link
Collaborator

It shouldn't be included in this Project. If v2ray-plugin could be packaged in the image, why wouldn't the others?

@realies
Copy link
Contributor Author

realies commented Oct 31, 2021

@zonyitoo, primarily because the v2ray-plugin is maintained by the shadowsocks organisation. It would be useful to have an official image that includes it, would the v2ray-plugin repository be more suitable?

@zonyitoo
Copy link
Collaborator

zonyitoo commented Oct 31, 2021

I think you could modify this Dockerfile to Dockerfile.plugin which could include all official maintained plugins.

But, is it possible to make a v2ray-plugin only image and then run multiple images in a k8s group? In that case you won't need to package all plugins into one image.

@realies
Copy link
Contributor Author

realies commented Oct 31, 2021

@zonyitoo, Is there a list of all plugins maintained by shadowsocks somewhere? https://shadowsocks.org/en/wiki/Plugin.html points me to kcptun and v2ray-plugin.

Not sure I understand the question about the k8s group - assume you mean creating a plugin image and mounting its binary into a barebones shadowsocks-rust container? Not aware if that's possible, but if it is, it may require Kubernetes.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Nov 1, 2021

You could just create a Dockerfile.plugin file for creating an image containing sslocal or ssserver with plugins. And then make a document for guiding how to add new plugins into this image.

All the following requests about adding plugins could make a PR to add it into this Dockerfile.plugin.

This solution have some obvious flaws:

  1. The image might be large because it will contain many plugins that you don't need.
  2. When you need a new plugin, making a new PR, merge, waiting for the next release may be too long for users that need to use it immediately.

Kubernetes should be a possible solution.

Based on your description (about mounting binaries), there should be a solution that you could just download the v2ray-plugin releases on your host machine and then mount them into the container's /usr/bin/v2ray-* paths. Flexible, and easy to manage. One possible flaw is that if the plugin requires some other runtime, such as Python, then it will become an issue.

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

Successfully merging this pull request may close these issues.

2 participants