daytona
daytona copied to clipboard
Move to centralized prebuilt go devcontainer
Is your feature request related to a problem? Please describe.
devcontainers can take a lot of time and resources to continuously built. Also each of the providers projects will have almost identical devcontainer files. Lets centralize the devcontainer, prebuild it, and save everyone time.
Describe the solution you'd like
I've recreated the devcontainer in https://github.com/daytonaio/go-devcontainer. There is a GitHub Actions pipeline to automatically build it on commit (pushed to main) and on tag (pushed with major.minor.patch tags). The image is ~2G.
Building the existing devcontainer takes ~4.5m from a fully purged Docker engine (no images, volumes, etc).
devcontainer up --workspace-folder .
4.78s user 2.86s system 2% cpu 4:28.72 total
Building with the prebuilt (on an admittedly fast internet connection) takes 35s from a fully purged Docker engine (no images, volumes, etc).
devcontainer up --workspace-folder .
0.51s user 0.16s system 1% cpu 34.755 total
This also reduces the overall number of bytes downloaded, as the intermediate images/packages are not needed to be downloaded to built the image.
Toolchain updates can be made in daytonaio/go-devcontainer
and will automatically propagate to all the projects.