feat(templates): add docker-texlive template with code-server#828
feat(templates): add docker-texlive template with code-server#828joergklein wants to merge 7 commits intocoder:mainfrom
Conversation
matifali
left a comment
There was a problem hiding this comment.
Thanks for your contribution @joergklein, but the new template should go to templates under a new namespace under your own name.
See this for example: https://github.com/coder/registry/tree/main/registry/umair/templates
|
@matifali Thanks for your quick reply. This is my first attempt at writing a template. Could you perhaps move the template to the correct folder? I’ve made a few other mistakes as well; for example, the description file is incomplete. |
- Move files from modules/docker-texlive/ to correct namespace path - Create namespace README for joergklein - Move Dockerfile into build/ subdirectory - Fix README frontmatter: remove verified flag, fix icon path - Fix main.tf: add entrypoint for coder agent, fix label syntax, add metadata blocks, remove invalid coder_app resource
|
@joergklein I did some bootstrapping to make things move to the correct spots. You can now test and finalize the changes. Thanks |
registry/joergklein/README.md
Outdated
| display_name: "Jörg Klein" | ||
| bio: "Data Scientists" | ||
| github: "joergklein" | ||
| avatar: "https://avatars.githubusercontent.com/u/38553171?v=4" |
There was a problem hiding this comment.
You need to upload your photo in the namespace directory. No remote urls supported.
There was a problem hiding this comment.
Pull request overview
Adds a new community template under registry/joergklein/templates/docker-texlive to provision a Docker-based TeX Live workspace with code-server, and introduces the contributor namespace README for joergklein.
Changes:
- Add a new Docker + TeX Live + code-server template (Terraform + Docker build context).
- Add template documentation (template README).
- Add contributor profile README for the
joergkleinnamespace.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| registry/joergklein/templates/docker-texlive/README.md | Documents prerequisites, architecture, and customization for the TeX Live Docker template. |
| registry/joergklein/templates/docker-texlive/main.tf | Provisions the Coder agent, code-server module, Docker image build, persistent volume, and container runtime. |
| registry/joergklein/templates/docker-texlive/build/Dockerfile | Defines the TeX Live-derived image used by the workspace container. |
| registry/joergklein/README.md | Adds contributor profile frontmatter/body for the joergklein namespace. |
| resource "docker_image" "texlive" { | ||
| name = "texlive:${var.texlive_version}" | ||
| build { | ||
| context = "./build" | ||
| dockerfile = "Dockerfile" | ||
| build_args = { | ||
| TEXLIVE_VERSION = var.texlive_version | ||
| } | ||
| } |
There was a problem hiding this comment.
docker_image is given a non-unique name (texlive:${var.texlive_version}), which can cause collisions across multiple workspaces sharing the same Docker host (different Terraform states managing/removing the same image tag on destroy). Use a workspace-unique image name/tag (commonly coder-${data.coder_workspace.me.id} or similar) and reference that from the container resource.
| resource "docker_image" "texlive" { | ||
| name = "texlive:${var.texlive_version}" | ||
| build { | ||
| context = "./build" | ||
| dockerfile = "Dockerfile" | ||
| build_args = { | ||
| TEXLIVE_VERSION = var.texlive_version | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
docker_image builds from a local context, but there are no triggers to force Terraform to detect changes in build/ files (e.g., Dockerfile updates). In this repo’s Docker build templates, a dir hash trigger is used so terraform apply will rebuild when build/* changes; consider adding an equivalent trigger here.
Co-authored-by: Atif Ali <atif@coder.com>
Description
Type of Change
Module Information
Path:
registry/[namespace]/modules/[module-name]New version:
v1.0.0Breaking change: [ ] Yes [ ] No
Template Information
Path:
registry/[namespace]/templates/[template-name]Testing & Validation
bun test)bun fmt)Related Issues