C
Coder.com•13mo ago
Sharp

envbox + envbuilder template

In my attempts to get a secure k3s-compatiable coder setup working, I am trying to get envbuilder to work from inside envbox.
{"ts":"2023-08-21T03:24:35.37819366Z","level":"ERROR","msg":"send startup logs","caller":"/home/runner/work/envbox/envbox/buildlog/coder.go:116","func":"github.com/coder/envbox/buildlog.(*CoderLogger).processLogs.func1","fields":{"error":"Patch \"https://coder.mcaq.me/api/v2/workspaceagents/me/startup-logs\": context canceled"}}
run: get image metadata: start container: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: container_linux.go:425: starting container process caused: exec: "sleep": executable file not found in $PATH: unknown
{"ts":"2023-08-21T03:24:35.37819366Z","level":"ERROR","msg":"send startup logs","caller":"/home/runner/work/envbox/envbox/buildlog/coder.go:116","func":"github.com/coder/envbox/buildlog.(*CoderLogger).processLogs.func1","fields":{"error":"Patch \"https://coder.mcaq.me/api/v2/workspaceagents/me/startup-logs\": context canceled"}}
run: get image metadata: start container: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: container_linux.go:425: starting container process caused: exec: "sleep": executable file not found in $PATH: unknown
Currently this is my issue. Find the full log attatched. Find my current template here https://github.com/Sharpz7/Sharpz7/blob/main/templates/devcontainer/main.tf
GitHub
Sharpz7/templates/devcontainer/main.tf at main · Sharpz7/Sharpz7
Contribute to Sharpz7/Sharpz7 development by creating an account on GitHub.
37 Replies
Codercord
Codercord•13mo ago
<#1143024634099413084>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
kyle
kyle•13mo ago
envbox starts the container with sleep as the init to get a dummy entry to read /etc/passwd to find the user to run as, so it won't work under the current structure.
Sharp
Sharp•13mo ago
Ah. So I need to create a custom envbuilder image?
kyle
kyle•13mo ago
Yup, tragically
Sharp
Sharp•13mo ago
Right. I'll look into that. Maybe I just directly contribute changes to the repo? I imagine k3s+coder+env builder+envbox would be a hobbyists quickest way to a full coder solution? I have halted my efforts to contribute my stuff upstream because I still have docker issues. im hoping envbox fixes them. If it does I'll definitely get contributions+a blog post written
Sharp
Sharp•13mo ago
@Phorcys I am attempting to put both into a template: https://github.com/Sharpz7/Sharpz7/blob/main/templates/devcontainer/main.tf https://github.com/Sharpz7/Sharpz7/blob/main/dockerfiles/envbuilder.Dockerfile (Needed to deal with the fact envbox assumes access to sleep in container https://drive.google.com/uc?id=1GtrxNXWPWJDkYPdW-hvqkmqbZLgP8Xwg (the pod has no errors)
GitHub
Sharpz7/templates/devcontainer/main.tf at main · Sharpz7/Sharpz7
Contribute to Sharpz7/Sharpz7 development by creating an account on GitHub.
GitHub
Sharpz7/dockerfiles/envbuilder.Dockerfile at main · Sharpz7/Sharpz7
Contribute to Sharpz7/Sharpz7 development by creating an account on GitHub.
Sharp
Sharp•13mo ago
My guess is I now need a change to actually trigger the code in the container? Or maybe my code-server script needs moved? I am not sure
Phorcys
Phorcys•13mo ago
honestly i'm looking at envbuilder and i don't really understand it sooo i don't know if i'll be able to help
Sharp
Sharp•13mo ago
Hahha no problem! I see if I can get someone else
Phorcys
Phorcys•13mo ago
i'll look into it if i get some free time today
Sharp
Sharp•13mo ago
Thanks, I have a few ideas yet so I will try em Although, I really should go to bed
Phorcys
Phorcys•13mo ago
health 1st but fun 0st
Sharp
Sharp•13mo ago
Trying to convince my uni to flood me with gcp credits
Sharp
Sharp•13mo ago
{"output":"Failed to run envbox: boostrap container: timed out boostrapping container: boostrap container (): \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u003eerror: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1","time":"2023-08-23T07:18:01.018889288Z","type":"error"}
{"output":"Failed to run envbox: run: boostrap container: timed out boostrapping container: boostrap container (): \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u003eerror: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1","time":"2023-08-23T07:18:01.019184447Z","type":"error"}
{"output":"","time":"2023-08-23T07:18:01.019200808Z","type":"done"}
run: boostrap container: timed out boostrapping container: boostrap container (): >error: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1
{"output":"Failed to run envbox: boostrap container: timed out boostrapping container: boostrap container (): \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u003eerror: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1","time":"2023-08-23T07:18:01.018889288Z","type":"error"}
{"output":"Failed to run envbox: run: boostrap container: timed out boostrapping container: boostrap container (): \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u003eerror: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1","time":"2023-08-23T07:18:01.019184447Z","type":"error"}
{"output":"","time":"2023-08-23T07:18:01.019200808Z","type":"done"}
run: boostrap container: timed out boostrapping container: boostrap container (): >error: CODER_AGENT_URL must be set if CODER_AGENT_TOKEN is set: exit code 1
This is as far as I got, see the links above for more information. I think the problem is the init_scripts, like what to run, and where: https://github.com/Sharpz7/Sharpz7/blob/main/templates/devcontainer/main.tf#L184
GitHub
Sharpz7/templates/devcontainer/main.tf at main · Sharpz7/Sharpz7
Contribute to Sharpz7/Sharpz7 development by creating an account on GitHub.
Sharp
Sharp•13mo ago
@kyle Sorry for the ping, but I think at this point its an intracasy I could do with a staff member look at.
Want results from more Discord servers?
Add your server