- Notifications
You must be signed in to change notification settings - Fork1k
chore: add envbuilder-dogfood template#13720
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
+432 −0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
dannykopping approved these changesJun 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Let's go!
Non-blocking: I wonder if we can extract some common elements of this and the dogfood definitions to avoid copy-pasta?
Yeah I'd like to do that at some point! |
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
I've been dogfooding it for the last few days without any major issues, so putting this under VCS.
This template uses the latest version of
coder/envbuilder
, and makes heavy use of a Docker cache to avoid having to actually execute all of the layers.With this, a newly created workspace is available in approximately 7 minutes from the envbuilder image starting.
Some notes and future work:
/var/run
is a symlink to/run
. Kaniko appears to ignore symbolic links in images, meaning that in the built image there is no/var/run
folder. For now I'm symlinking this in the agent startup script before starting the Docker daemon.docker
group is added to the running system. However, the Coder agent executed by the non-root user doesn't end up in this group. As a workaround, I've made/var/run/docker.sock
world read-writable. The alternative is hacking the agent startup script to includenewgrp
or adding the ability for envbuilder to do the equivalent of anewgrp
invocation.