C
Coder.com4mo ago
SamG

Does Coder Honor the Devcontainers Spec fully?

Hi Folks, I've been having some difficulties with devcontainers and coder. I've been using devcontainers successfully with GitHub codespaces. Coder picks up the correct image from devcontainer.json but nothing else. I've attached the template's main.tf file and the logs. And below is the devcontainers.json file. Any suggestions? { "image": "mcr.microsoft.com/devcontainers/universal:2-linux", "postCreateCommand": "/bin/bash -i -c .devcontainer/startup_script.sh", "customizations": { // Configure properties specific to VS Code. "vscode": {
// Add the IDs of extensions you want installed when the container is created. "extensions": [ "hashicorp.terraform", "ms-kubernetes-tools.vscode-kubernetes-tools" ] } }, "hostRequirements": { "cpus": 4, "memory": "16gb", "storage": "32gb" } }
4 Replies
Phorcys
Phorcys3mo ago
hey @SamG, is this the full workspace log? oh sorry, Discord ellipsized it
Phorcys
Phorcys3mo ago
for the record, no I don't think envbox currently has full coverage of the spec
GitHub
GitHub - coder/envbox: envbox is an image that enables creating non...
envbox is an image that enables creating non-privileged containers capable of running system-level software (e.g. dockerd, systemd, etc) in Kubernetes. - coder/envbox
Phorcys
Phorcys3mo ago
what's wrong? it seems like the logs are okay do you maybe have an error message that you can send/screenshot ? fyi: Git is part of the built-in icons, so you can just do this
data "coder_parameter" "custom_repo_url" {
name = "repo"
icon = data.coder_workspace.me.access_url + "/icon/git.svg"
display_name = "Repository URL"
default = ""
description = "Enter a repository URL."
mutable = true
}
data "coder_parameter" "custom_repo_url" {
name = "repo"
icon = data.coder_workspace.me.access_url + "/icon/git.svg"
display_name = "Repository URL"
default = ""
description = "Enter a repository URL."
mutable = true
}
for the following part, you might consider using the Git Config module.
env = {
GIT_AUTHOR_NAME = coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_AUTHOR_EMAIL = "${data.coder_workspace.me.owner_email}"
GIT_COMMITTER_NAME = coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_COMMITTER_EMAIL = "${data.coder_workspace.me.owner_email}"
GITHUB_TOKEN = data.coder_external_auth.github.access_token
}
env = {
GIT_AUTHOR_NAME = coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_AUTHOR_EMAIL = "${data.coder_workspace.me.owner_email}"
GIT_COMMITTER_NAME = coalesce(data.coder_workspace.me.owner_name, data.coder_workspace.me.owner)
GIT_COMMITTER_EMAIL = "${data.coder_workspace.me.owner_email}"
GITHUB_TOKEN = data.coder_external_auth.github.access_token
}
Phorcys
Phorcys3mo ago
also, some of your resources refer to a var.namespace variable that isn't defined
No description
Want results from more Discord servers?
Add your server