Skerit
Skerit
CCoder.com
Created by Skerit on 9/5/2022 in #help
Setting up a database in a template
Sure!
15 replies
CCoder.com
Created by Skerit on 9/5/2022 in #help
Setting up a database in a template
Or am I going about this all wrong, and should I create a new Docker image (based on codercom/code-server:latest) that contains all the services I need?
15 replies
CCoder.com
Created by Skerit on 9/5/2022 in #help
Setting up a database in a template
So each workspace has its own port space, but when I define a docker container like this:
resource "docker_container" "mongodb" {
image = docker_image.mongodb.latest
name = "${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}-mongodb"
ports {
internal = 27017
external = 27017
}
}
resource "docker_container" "mongodb" {
image = docker_image.mongodb.latest
name = "${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}-mongodb"
ports {
internal = 27017
external = 27017
}
}
I get this error: Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in use Which makes sense, because there is another, non-coder MongoDB container exposing that port to the host machine. So how do I make that work? 🤔
15 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Thank you for guiding me through it! Many other projects would have given up and told me I was on my own 😄
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Fyi: I deleted the image itself and recreated the template & workspace and now docker-code-server does work!
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Perfect. I was also wondering why (even though the root partition was all wrong) the Agent token is invalid thing kept happening... Guess we'll never really know ^^
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
I might post a little comment on there. Maybe it has something todo with a snapshot I made, restored & then rolled back again of the root drive.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Found someone else that had a similar issue... 6 years ago: https://github.com/moby/moby/issues/10216
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Hmm, everything's the same. That container's root is basically the same as the host's root.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Huh. The /etc/passwd file in the container is the same as the one of the host server. It's a copy.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Adding the HOME env didn't fix it either.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
First test failed, with the agent token error and the chdir/wrong HOME thing. Adding the HOME env var now.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Sure
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
(Didn't even have to add the user="coder:coder" bit)
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Well well well... the plain docker one works.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Sure, hold on
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Not sure, unless it's a snapshot issue. Funny thing is that this is all a default docker install (except for the dns setting) Looking at the documentation, I thought using the btrfs storage method required some manual changes.
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
I see my docker is using the btrfs method...
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
Could it be related to my user issue and somehow get the wrong env variables or something?
109 replies
CCoder.com
Created by Skerit on 9/6/2022 in #help
Agent token is invalid inside of workspace container
And yes, that test with the alpine image did echo world
109 replies