Is there a right way to building your own image for workspaces

I have a unique scenario where git auth does not work with our on-prem TFS, so envbuilder was not working for me at all. As a work-around, or at least an idea, I thought to build my own image to be used for the workspace with all of the scripts and packages to run. When I deploy my Coder control plane to EKS and try to create my workspace from my image I get the following error Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 29s default-scheduler Successfully assigned coder/coder-0d7dee71-484c-4da6-9db5-8be2315373ef-5554b6bb85-fh89c to ip-10-179-166-175.us-east-2.compute.internal Normal Pulled 28s kubelet Successfully pulled image "artifactory.example.com/container-dsl-nonprod/testuser1/vscode-ide:v0.0.3" in 325ms (325ms including waiting). Image size: 1305481070 bytes. Normal Pulled 27s kubelet Successfully pulled image "artifactory.example.com/container-dsl-nonprod/testuser1/vscode-ide:v0.0.3" in 337ms (337ms including waiting). Image size: 1305481070 bytes. Normal Pulling 12s (x3 over 28s) kubelet Pulling image "artifactory.example.com/container-dsl-nonprod/testuser1/vscode-ide:v0.0.3" Normal Created 11s (x3 over 28s) kubelet Created container: dev Normal Started 11s (x3 over 28s) kubelet Started container dev Warning BackOff 11s (x2 over 27s) kubelet Back-off restarting failed container dev in pod coder-0d7dee71-484c-4da6-9db5-8be2315373ef-5554b6bb85-fh89c_coder(ef95784e-cd20-468a-be33-af50984665e0) Normal Pulled 11s kubelet Successfully pulled image "artifactory.example.com/container-dsl-nonprod/testuser1/vscode-ide:v0.0.3" in 385ms (385ms including waiting). Image size: 1305481070 bytes.
11 Replies
Codercord
Codercord3mo ago
Codercord
Codercord3mo ago
<#1394419618008924210>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
yuji.fushiguro
yuji.fushiguroOP3mo ago
This works locally when I do a docker build and a docker run. But fails when I try to use the image for my workspace
Scott
Scott3mo ago
What does your workspace template look like?
yuji.fushiguro
yuji.fushiguroOP3mo ago
I've updated my Dockerfile to look like the following. And attached is my template that I used. With this setup I'm able to get pass the error and the container does run but my workspace doesn't start. It has a warning of "Agent is taking too long to connect" @Scott
yuji.fushiguro
yuji.fushiguroOP3mo ago
Not sure how valid these docs are but I based my image build off this: https://s.cdr.dev/docs/images/writing/ And the official site: https://coder.com/docs/admin/templates/managing-templates/image-management
Coder
Image Management | Coder Docs
Learn about template image management
yuji.fushiguro
yuji.fushiguroOP3mo ago
I was able to figure out the issue.
Phorcys
Phorcys3mo ago
hey! apologies on the delay, what was the root cause?

Did you find this page helpful?