generic-worker
generic-worker copied to clipboard
Problems when running generic-worker inside a docker container
I was trying to run generic-worker in a x86_64 docker container, but it would keep dying with error 76. I created a debug build with extra output and it revealed that it's an issue with user.Current.
2019/02/19 19:38:45 Loading generic-worker config file '/builds/worker/tmp/generic-worker.yml'...
2019/02/19 19:38:45 Creating file /builds/worker/tmp/generic-worker.yml...
2019/02/19 19:38:45 Saving file /builds/worker/tmp/generic-worker.yml (absolute path: /builds/worker/tmp/generic-worker.yml)
2019/02/19 19:38:45 main: about to run securefiles
2019/02/19 19:38:45 main: securefiles err: user: Current not implemented on linux/amd64
root@46f0391b5a17:~#
This seems to be a known issue (https://github.com/golang/go/issues/14625). I was able to get generic-worker running by setting the USER environment variable (as mentioned in https://github.com/ksonnet/ksonnet/issues/298).
I thought that compiling just linux_64 on linux_64 would solve the issue (it seems CGO is only enabled for non-cross-compilation builds), but I got the same error.
I think the solution here is for the docs to say that if you run a linux build of generic-worker inside a docker container, you should make sure USER
env var is set.
@aerickson / @bclary do you agree?
Were there any other issues you encountered that we should address at the same time?
Apologies for delay responding to this issue.
@pmoore Yeah, I think mentioning in the docs is enough for now.
I think that was the only problem I encountered.
Sounds good to me.