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

Plugin enable command is looking for .sock file in /run/docker/plugins/<docker-plugin-id> and not /run/docker/plugins #113

Open
rajulm opened this issue Jul 22, 2019 · 0 comments

Comments

@rajulm
Copy link

rajulm commented Jul 22, 2019

I am trying to create a java plugin because of the use case that we have where we want to use some java library(which is hard to migrate in golang). Since I didn't find any helpers which are already there in github, I am trying to code from scratch!

I have made a good progress on that but I am stuck at one point where "plugin enable <plugin_name>" command is not able to find the .sock file at the desired location.

As per this document -- Plugin Discovery, sock file should be created in directory -- /run/docker/plugins. I looked at the code for "go-plugin-helpers" code as well (reference here), we are creating the .sock files in the location /run/docker/plugins/ . There are 2 things I am not sure about and which has got me confused:

  1. When I try installing and enabling the sample plugins which are already developed in golang, I actually see the sock file in location /run/docker/plugins/a864dd55a0963ec5d1b501497864617be3b4b49d12a9b6f482e2d5ec72e4eb1c/jsonfile.sock and not /run/docker/plugins/jsonfile.sock. As per code, it is created as latter, then how is it creating the former. Which step is doing that in code? Am I missing something?
  2. When I try to create a plugin and enable it, I am creating the .sock file in the suggested location /run/docker/plugins/ but my plugin enable command fails looking for the file in a different location Error response from daemon: dial unix /run/docker/plugins/a2b3f998d76eac6fa21d9e2963de29b1385b2244231f87a6b5a6bf05ac8ae7e9/jsonfile.sock: connect: no such file or directory

SO the questions are :

  1. Why is it looking in the directory /run/docker/plugins/<docker-plugin-id> and not at the location where it is supposed to look at? Is it some configuration that I am missing?
  2. How are go-helpers creating under the directory ```/run/docker/plugins/`` when I don't see any code which has any id passed and accepted?

I can share more details if someone has any pointers and can answer some questions here? Would really appreciate any help.

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

1 participant