chore: add envbuilder-dogfood template #13720
Merged
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.
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.