generic-worker icon indicating copy to clipboard operation
generic-worker copied to clipboard

Problems when running generic-worker inside a docker container

Open aerickson opened this issue 6 years ago • 3 comments

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.

aerickson avatar Feb 19 '19 22:02 aerickson

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.

petemoore avatar Jul 10 '19 18:07 petemoore

@pmoore Yeah, I think mentioning in the docs is enough for now.

I think that was the only problem I encountered.

aerickson avatar Jul 10 '19 18:07 aerickson

Sounds good to me.

bclary avatar Jul 10 '19 20:07 bclary