Some Dinosaur
CCoder.com
•Created by Some Dinosaur on 1/20/2025 in #help
Docker in workspace
Sorry I passed out. I will get back to it tomorrow 👌
6 replies
CCoder.com
•Created by Some Dinosaur on 1/20/2025 in #help
Docker in workspace
I've ran this devcontainer raw on my system and the same thing appears - so it must be just Devcontainers thing. But maybne you know how to overcome this anyways?
6 replies
CCoder.com
•Created by Some Dinosaur on 1/4/2025 in #help
Coder ran on a machine with VPN can't resolve the hostname
I'm trying to set up my own DNS that I'd force the VPN to use, hoping that the name will resolve to the IP. Instead of hoping for host-name resolution I will have my own tables... maybe that works we'll see
6 replies
CCoder.com
•Created by Some Dinosaur on 1/4/2025 in #help
Coder ran on a machine with VPN can't resolve the hostname
I can ping the host through the raw local ip address - so it's just the name resolution that fails.
6 replies
CCoder.com
•Created by Some Dinosaur on 12/23/2024 in #help
Failed to pull GitHub private repo
ok - someone on Stackoverflow faced the same problem. I was trying to authenticate on the host with
host_name:7080
but once I replaced host_name
with localhost
it just works. I don't know what is happening anymore32 replies
CCoder.com
•Created by Some Dinosaur on 12/23/2024 in #help
Failed to pull GitHub private repo
Ok, I tried to set up the same thing that worked with OAuth on a different machine. Now every time I click
Click to Login
I get:
32 replies
CCoder.com
•Created by Syrelash on 12/31/2024 in #help
Modify $PATH to include custom bin folder
I never used
/etc/environment
but internet says it doesn't support export
so it only allows you to set some static variables I guess? I think doing it your way might work if you've used ~/.bashrc
instead but then it's per-user9 replies
CCoder.com
•Created by Syrelash on 12/31/2024 in #help
Modify $PATH to include custom bin folder
I just added this to my
Dockerfile
:
and it seems to work:
9 replies
CCoder.com
•Created by Some Dinosaur on 12/23/2024 in #help
Failed to pull GitHub private repo
I haven't got a chance to try passing the raw key yet.
32 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
(can't close it... how do I close the thread?)
38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
/close
38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
Windows
I've done this from my Windows PC so I could play games in-between builds - big mistake. I had a lot of errors due to CRLF line endings that caused both scripts to fail and whole Coder frontend to freeze - not reporting any logs until I restarted it. I think the frontend should just filter out
CR
on Build if it causes problem but it is what it is. I'd say just avoid Windows, Coder feels a bit clunky with it.38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
Componentisation - why not?
I really wanted to keep things separate, to have like 3 scripts:
vs-install.sh
, vs-extensions.sh
, vs-settings.sh
but it's hard to do. There's no synchronization mechanism for separate script resources and as the documentation says:
When multiple scripts are assigned to the same agent, they are executed in parallel.So if your scripts depend on each other - like in my case I can't install extensions before
code-server
is installed - you'll have to make scripts way more complex to add synchronization. You could do file-system based synchronization - locking a file as a mutex so that other scripts wait for it to be available - but for me it sounds like too much work for the simple setup im trying to achieve.38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
1. The first part
Install the latest code-server
is just copy-paste of what was initially in startup_script
.
2. Second part Import settings
I wrote myself - it'll take settings from .devcontainer/devcontainer.json
and merge settings with what is already set on the machine. Notice that I assume the .devcontainer
folder to be available at CWD - you might want to do instead */.devcontainer/devcontainer.json
to dig one level lower if you go with default workspaces
folder. Or even better what I should've done - define the path as env-variable. code-server
doesn't provide any command to set the settings, so I update settings.json
file manually - I'd much rather have something like --install-extension
command.
3. Third part to install extensions is a copy-pase from here. I changed the path too for my own CWD setup. It will call code-server --install-extension
for every extension listed in your devcontainer.json
.
It's a simple solution and it works - I hope it works for you as well.38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
(I don't have Discord Nitro, need to post my final solution in a couple messages. sorry!)
Solution
I think I've got this one relatively covered now. So here's what I've done. I edited the template I had by first removing the
startup_script
from the resource "coder_agent" "main"
because documentation on coder_agent
startup_script
says:
This option is an alias for defining a coder_script resource with run_on_start set to true.So I prefer to have the init script detached, you can give it an icon and all. Next I added the
coder_script
:38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
yeah I figured but I think I can't. I pasted my script to my Ubuntu remote, cleaned all line endings to LF, but it still had some leftovers 😦 feels very clunky to use these at the moment, I pasted my script raw into the TF
38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
Also because of this...:
When multiple scripts are assigned to the same agent, they are executed in parallel.if I ever want to separate installing extensions from settings importing - I need to do some synchronization (can do file-system based) which sounds sketchy.
38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
I just pasted the script into the
startup_script
in resource "coder_agent" "main"
... but I wish there was a way to use a resource for it :c which should be the case with what I've done above according to:
but it just won't work38 replies
CCoder.com
•Created by Some Dinosaur on 12/25/2024 in #help
Set "extensions" and "theme" from `devcontainer.json`
I've added a new file to the template:
vs-extensions.sh
and here are the contents (copied from here):
Next I've added coder_script
as follows:
And I keep getting these weird errors about $\r
:
38 replies