Need help with docker-code-server template.
Installed coder, configured template with architecture of host and docker_url. After successful build in workspaces started session, but there no button for vs code in browser.
172 Replies
It was like for 30 minute and after that, its says unhealthy.
i used docker-code-server template, installing on raspberry pi 3b+, set armv7 as host_arch.
my template looks like, i used linuxserver image of code-server because codercom was not found error appeared.
@Phorcys @Atif sorry for ping. Can you help me please?
How can I get reason why it unhealthy?
@colin (rust enthusiast) sorry for ping, I saw you helped a lot others.
please just wait, we also have lifes of our own. I usually respond in less than a day
Sorry for that.
that's not the same issue
does the terminal work?
In site no
It's always disconnected
you should make your own dockerfile and install curl in it
I think that's the issue
Hmm that the main problem, I'm bad at docker anyway. Make dockerfile in the same path for template but in /images?
And then add install curl? Or how. Is there some example
and then should somehow import dockerfile in main.tf?
it's not hard
hold on
1 moment i will send you how my docker looks
then in your
docker_container
resource you will set image = docker_image.basic_env.image_id
won't work
if codercom/code-server was not found it's because it doesn't support your architecture
so it won't be found here eitheroh, but linuxserver works
do this instead
i thought its support armv7(armhf)
this is all you'd need
okay
i made in main.tf like this. my dockerfile called code-server. 1 moment i will fix path and etc
ni
no
path is good
you just want
Dockerfile
in the same folder as the main.tf
but i put it in /images
alright
like /template folder(where main.tf)/images
then path is
./images
yehokay i will push and try wo make workspace. Maybe minute 3-4
on push this error: A managed resource "docker_image" "basic_env" has not been declared in the root module.
oh yeah replace
basic_env
with image
my badno problem
pushing
This object has no argument, nested block, or exported attribute named "image_id".
show me
sorry for screenshot putty not copying good in buffer
do you have two docker_container resources?
no
idk it looks like so
looks fine to me
1 got 1 docker_volume, 1 docker_image, and 1 docker_container
no second docker_container, i really dont now why
this error occur
full code of docker_container
@Phorcys full code of main.tf with your fixes.
try setting kreuzwerker/docker version to 2.23.1
I think image_id is new
without ~>?
seems like it started pushing
with
oh
it's whatever
its pushed but i will repush with ~>, and try to make workspace
Error: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount1976360995/Dockerfile: no such file or directory
i get this error
and its failed for all build
try moving the dockerfile to same folder as template and use path .
maybe that's the issue idk
ok
1 moment
should be fine but we never know
if docker file named code-server, that code correct?
build {
path = "."
tag = ["org/code-server", "org/code-server:latest", "org/code-server:v0.1"]
}
still same error Error: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount3808798986/Dockerfile: no such file or directory.
extension name for dockerfile must be .Dockerfile?
did it correct ended?
@Phorcysi tried to change names and values in image resource, still no work. Maybe there chance to install curl in startup script? Or prefer using dockerfile?
the name must be "Dockerfile" if you don't specify a name argument
dockerfile named code-server.Dockerfile
correct?
and there code-server like named file
no
is it correct?
no
tag doesn't have to do with filename
correct?
okay, pushing
depends on the name of your file and it's location
in same folder as main.tf and name how i wrote it.
pushing, and makign workspace. Will see if it works
Still same error
but now it sees code-server.Dockerfile. But what is the problem
there just no anything about image
isnt it not correct? @Phorcys
that is good
then i dont have any idea why its cant find dockerfile
its in site already
can you show me your template folder's tree?
ls?
tree
in terminal no command tree
wait
coder template tree?
there no command
in site it like this
mmisunderstood you, sorry 1 moment
fixed naming error there was double -- in name
waiting for code-server initialization
@Phorcys still unhealthy, after success build
and terminal dont work too
Gotta go, thanks for your help. Will try tomorrow, if you got any idea why its not works write please. Or what i should do to give you more information
i sshed to workspace and enter curl and it worked but code-server not found
maybe this is the problem? But why then terminal dont works
@Phorcys I found problem, not installed node.js with npm. Because it's armv7 and there not standalone release it's tries to install using npm but there no npm and node.js, isn't in image supposed to be installed code-server? That linuxserver/code-server
And maybe if you know. I tried install code-server on pi without coder(for first time) and in script output installation was okay but when I started code it's says that vscode-oniguruna, vscode-textmate and xterm was not found. And like terminal not worked and detail in extension pages not works too. So I don't know how to fix it too. Because not so much people have that problem. That's why I thought installing coder and then using docker and coder it will works good. But now I got more problems:)
Will wait for your response soon
I will take a look once I'm at my office
If you need something like logs, ping me
yeah that was definitely the issue
yeah so
unhealthy only means that vscode didn't load
it should but that is weird
I'm going to help in a bit
trying to think how to solve this
But in startup_script I wrote install code-server and etc
you should install code-server from the image itself not the startup script
does your pi run arm64 ?
In template main.tf for docker there was just start code-server but it didn't Wark too
It's 3b+ which mean armv7l processor installed
alright so
here's what I'd do
Okay 1 moment
and remove the code-server install from your
startup_script
Okay
Just leave start code-server like "code-server and arguments"
yes
hold on the dockerfile is wrong
Your or mine?
both lol
hold on
Okay, but why you use latest when in build logs it's saying like it deprecated
you're right, just old bad habits
this should work
okay, and in main.tf delete install code-server code. Just run it
yes
startup_script "code-server --auth none --port 8080"
like in template
yes
Okay creating workspace
Error: executor failed running [/bin/sh -c apt update -y]: exit code: 100
oh wait
i made mistake when copied docker
wait
no mistake
all correct
yeah its correct
and in main its seems correct
try this
pushing
still same error
with apt update -y
how
it should definitely just work
i dont know
lol
can you upload this dockerfile to your server and try running
docker build
with it ?
so we can see the actual errorIt's on my server
1 moment
I will build it
Isn't error can be because Part where user creating it's in 1 line
Not in lines like you
wdym
Part where you create User in dockerfile I copied and pasted in 1 whole line
show me
like this
that can't work
add a line break after every
\
okay, i actually dont understand why command docker build -f code-server.Dockerfile not work. On my machine it says like requires 1 argument
and i in directory with dockerfile
can you show me the error ?
1 moment, editing Dockerfile how you said
like this?
should work
Dockerfile in this folder
try
docker build -f code-server.Dockerfile .
building
error. Log:
any ideas
sorry
so
i tried adding missing key but its saying that no package gnupg, gnupg1 or gnupg2 and i cant install them with apt get because of there no this packages in repo
I have searched a bit
try to update your host system (raspberry pi)'s docker / runc / libseccomp
this 3 packages?
yeh
and docker latest version on my pi
alright
try dockerd too
if that doesn't work then changing the ubuntu version should work
what it
since i've just read it's a jammy issue
docker daemon
just run
apt full-upgrade
basicallyin dockerfile
?
sed
not in the container
inside your host
oh
lol
sorry
it's fine
okay not too much on update 130 mb
need wait for some time
isnt it a problem that i use debian?
shouldn't be
if it's still not working then use this
its not updated anything that related with docker, only nodejs and some packages for 3dprinter
yeah then that
oh wait
changed to ubunto 20.04
wtf
honestly idk
and i've got some stuff to do
maybe you can try changing your source image to debian ? this is so weird
okay, when you will be free, ping me
oka
i will try play with images
debian:bullseye should be a nice fit
or debian:11 , in docker hub said it works too
same error
I think I will make something with host because it's host problem
So i managed install libseccomp2-2.5.1.1 which fixes error. Strange why full update doesnt want to update that too. Now need to install npm and node.js or use image where its already installed for armv7l
now i managed in docker container all but on installing code-server error from gyp
i think it's because you're using an arm machine
doesn't seem like an error though
yeah i found thread in code-server related to argon2 and pi. But i dont know to implement fix in docker.
show me
Its stopping creating docker then
GitHub
[Bug]: argon2 can't rebuild at alpine 3.15 node 16 · Issue #5184 · ...
Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Local OS: Windows Remote OS: Alpine Remote Architecture: amd64 code-server --version: 4.4.0 ...
there posts about pi in it
i will look later
okay
seems i added something that finished instal of code-server. Waiting for full build
i just dont know if it normal if it stay and dont do nothing after this
oh, nvm
started other thing
its said that i finished wit hsucces
seems like working container. Will push it
is there any chance to output logs on build state in coder. For website. Like to see on what state of building docker
I don't think so
Sed, because i added so much installing for node-gyp and now its building like 10 mins min
like this
maybe in some temp directory
do you know at what temp?
i really don't
seems good, waiting
@Phorcys opened vscode link
and terminal not works too
in logs nothing for code-server
normal startup with 127.0.0.1:8080 address , tried with same address but port 5050
nothing
its says error 500 in console
any ideas?
First of all, only now i remember that where i setting coder is just rpi 3, not 3b+ . And i was thinking about installing on second board which 3b+. Now i see that in codercom images arm64(which support rpi3b+). So i will install it on correct board. And if error still there i will read another problem.(stupid head)
@PhorcysThank you for your support for this 2 days. As i wrote above in last messages i did some mistakes. Maybe someday i will manage to run it on 3b(if it neede) but now it works on 3b+.
cool !
thanks for letting me know
Sorry if disturb you
nah you're not
i was just kinda busy today
And anyway thank you. Now i will start play with Dockerfiles and etc to make it more beatiful for me