[Support] binhex - Code-Server


Recommended Posts

Overview: Support for Docker image arch-code-server in the binhex repo.

Application: Code-Server - https://github.com/cdr/code-server

Docker Hub: https://hub.docker.com/r/binhex/arch-code-server/

GitHub: https://github.com/binhex/arch-code-server

Documentation: https://github.com/binhex/documentation

 

If you appreciate my work, then please consider buying me a beer 😁

 

btn_donate_SM.gif
 

For other Docker support threads and requests, news and Docker template support for the binhex repository please use the "General" thread here

  • Like 1
Link to comment

Hi @binhex, Thank you for your work. I use a few of your other docker images and I am using linuxserver.io's code-server docker right now. What are the differences between this image and linuxserver.io's (apart from the base image code-server is installed to)?

 

Thanks again.

Link to comment

Hi, Binhex, I am use a lot of your app on my unraid. So far they are working so good. Thank a lot. Recently, 2 of my containers stop working. One is DelugeVPN and another is Code-server. I am runing code-server through swag follow your instruction. It runs good until yesterday. The log said:

 

2021-06-29 00:03:36.907411 [info] Host is running unRAID
2021-06-29 00:03:36.925185 [info] System information Linux edc35aebef02 5.10.28-Unraid #1 SMP Wed Apr 7 08:23:18 PDT 2021 x86_64 GNU/Linux
2021-06-29 00:03:36.948707 [info] OS_ARCH defined as 'x86-64'
2021-06-29 00:03:36.971340 [info] PUID defined as '99'
2021-06-29 00:03:37.009693 [info] PGID defined as '100'
2021-06-29 00:03:37.065151 [info] UMASK defined as '000'
2021-06-29 00:03:37.084929 [info] Permissions already set for '/config'
2021-06-29 00:03:37.121833 [info] Deleting files in /tmp (non recursive)...
2021-06-29 00:03:37.144496 [info] PASSWORD defined as '*****************'
2021-06-29 00:03:37.164598 [info] CERT_PATH not defined,(via -e CERT_PATH)
2021-06-29 00:03:37.186751 [info] CERT_KEY_PATH not defined,(via -e CERT_KEY_PATH)
2021-06-29 00:03:37.206839 [info] SELF_SIGNED_CERT defined as 'no'
2021-06-29 00:03:37.229365 [info] BIND_CLOUD_NAME not defined,(via -e BIND_CLOUD_NAME)
2021-06-29 00:03:37.274174 [info] Starting Supervisor...
2021-06-29 00:03:37,541 INFO Included extra file "/etc/supervisor/conf.d/code-server.conf" during parsing
2021-06-29 00:03:37,541 INFO Set uid to user 0 succeeded
2021-06-29 00:03:37,545 INFO supervisord started with pid 8
2021-06-29 00:03:38,547 INFO spawned: 'shutdown-script' with pid 105
2021-06-29 00:03:38,548 INFO spawned: 'start-script' with pid 106
2021-06-29 00:03:38,548 INFO reaped unknown pid 9 (exit status 0)
2021-06-29 00:03:39,233 DEBG 'start-script' stdout output:
[2021-06-28T17:03:39.232Z] info code-server 3.10.2 387b12ef4ca404ffd39d84834e1f0776e9e3c005

2021-06-29 00:03:39,233 INFO success: shutdown-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-06-29 00:03:39,233 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-06-29 00:03:39,233 DEBG 'start-script' stdout output:
[2021-06-28T17:03:39.233Z] info Using user-data-dir /config/code-server/user-data

2021-06-29 00:03:39,242 DEBG 'start-script' stdout output:
[2021-06-28T17:03:39.242Z] info Using config file /config/code-server/config/config.yml
[2021-06-28T17:03:39.242Z] info HTTP server listening on http://0.0.0.0:8500

2021-06-29 00:03:39,242 DEBG 'start-script' stdout output:
[2021-06-28T17:03:39.242Z] info - Authentication is enabled
[2021-06-28T17:03:39.242Z] info - Using password from $PASSWORD
[2021-06-28T17:03:39.242Z] info - Not serving HTTPS

 

I cannot run code-server anymore, until I change it all back to default settings. I am sure that it was working until yesterday.

 

The non-working app is delugeVPN, I will post the symtom to the support thread.

 

Thanks if you can point me to the right direction.

 

Long VU.

Link to comment
1 minute ago, Lohisa said:

I cannot run code-server anymore, until I change it all back to default settings. I am sure that it was working until yesterday.

there is nothing obviously wrong shown in the log, so i would check your SWAG config - i dont use SWAG so cant help out there, but maybe somebody on SWAG thread can.

Link to comment
On 6/23/2021 at 8:34 PM, neupsh said:

Hi @binhex, Thank you for your work. I use a few of your other docker images and I am using linuxserver.io's code-server docker right now. What are the differences between this image and linuxserver.io's (apart from the base image code-server is installed to)?

 

Thanks again.

difficult to say as i dont use LSIO's code-server container (obviously 🙂  ) but the main difference is going to be i support http and https, self signed and cloud hosted which i think LSIO doesn't, i also have modified code-server to use the official VSCode rep for extensions, dunno if LSIO has done that?, and lastly a very minor change, i have modified the icon as the code-server one is just plain nasty.

 

the other obvious change is i use arch linux, so adding in packages is probably easier (and a more extensive library) than the base OS LSIO uses, at the end of the day it IS the same app so the experience is going to be similar. 

  • Like 1
Link to comment
10 minutes ago, binhex said:

there is nothing obviously wrong shown in the log, so i would check your SWAG config - i dont use SWAG so cant help out there, but maybe somebody on SWAG thread can.

All other swag configurations for other apps working without any problem. I just checked swag config, honestly there isn't much to check because the conf file only change the name of container app.

 

The error when I open app is: "ERR_SSL_PROTOCOL_ERROR" if it can suggest any lead to explore.

 

BTW, in the worse case, how can I setup https without swag? what about NginxProxyManager? I don't know much about swag, I just follow the instruction. :)

Link to comment
  • 5 weeks later...

Hi @binhex, having an issue with the CERT_PATH and CERT_KEY_PATH variables.  Not sure what I'm doing wrong, appreciate all your work.  I placed the files in /config/code-server/certs directory as mentioned in the faq Q2/A2, then updated the variables. 

 

CERT_PATH is set to /config/code-server/certs/cert.crt

CERT_KEY_PATH is set to /config/code-server/certs/privkey.key

 

Error in the logs -

 

2021-07-29 17:10:20,837 DEBG 'start-script' stdout output:
[2021-07-29T21:10:20.837Z] error ENOENT: no such file or directory, open '/'/config/code-server/certs/cert.crt''

 

Note - I have SELF_SIGNED_CERT set to yes, wasn't sure if it should be set to no.

 

* I was able to get it to work removing the single quotes in /usr/local/bin/start.sh, and running the start.sh again.

 

        cert="--cert ${CERT_PATH}"
        cert_key="--cert-key ${CERT_KEY_PATH}"

 

Edited by RusticPotato
found the bug
Link to comment
11 hours ago, RusticPotato said:

* I was able to get it to work removing the single quotes in /usr/local/bin/start.sh, and running the start.sh again.

thanks for this, i have confirmed your fix works so pushed it out and currently rebuilding the image.

Link to comment
12 hours ago, RusticPotato said:

Hey @binhex, another question.  I have been using this for a few days now, would you happen to know how I would enable ssh? 

 

Tried seeing if the sshd service was present to enable but couldn't get past elevating to the su as it asks for a password.

ssh server is not included by default, but you can install it yourself if you need it by editing the example script in /config/code-server/scripts/example-startup-script.sh then specify the aor package for ssh and finally start it in that script, im afraid i dont have the time to support the thousands of different packages that you could install so you are on your own, but it should be simple enough.

 

can i ask why do you need ssh?, you have the terminal built into vs code and you can run as root via the docker 'console' so im intrigued as to the requirement.

Link to comment
4 hours ago, binhex said:

can i ask why do you need ssh?, you have the terminal built into vs code and you can run as root via the docker 'console' so im intrigued as to the requirement.

I ssh into my development machine(s) where all of my packages are already installed, then the projects I'm working on execute/build from that ssh console.  I also have a bitvise ssh server running on some windows machines in case I need to run some powershell scripts.  In general it helps if you are debugging, easily hopping to machines to reboot or control is invaluable when developing.

 

Look at the extension [Remote - SSH - Visual Studio Marketplace] https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh .

Link to comment
58 minutes ago, RusticPotato said:

I ssh into my development machine(s) where all of my packages are already installed, then the projects I'm working on execute/build from that ssh console.  I also have a bitvise ssh server running on some windows machines in case I need to run some powershell scripts.  In general it helps if you are debugging, easily hopping to machines to reboot or control is invaluable when developing.

 

Look at the extension [Remote - SSH - Visual Studio Marketplace] https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh .

ok cool, i can see the use in that, so yeah the example script mentioned above will allow you to do this, i am a little unclear as to whether you need the ssh client and server, but you can install both if required.

Link to comment
3 hours ago, binhex said:

ok cool, i can see the use in that, so yeah the example script mentioned above will allow you to do this, i am a little unclear as to whether you need the ssh client and server, but you can install both if required.

 

Yea only need to use the client not server.   I added openssh to aur_packages (eg aur_packages="openssh") in the example-startup-script.sh and the container wont start now:

 

2021-08-02 13:13:19.579191 [info] BIND_CLOUD_NAME not defined,(via -e BIND_CLOUD_NAME)
2021-08-02 13:13:19.613992 [info] ENABLE_STARTUP_SCRIPTS defined as 'yes'
cp: cannot stat '/home/nobody/scripts/*.sh': No such file or directory

 

* I should have put it in the AOR variable, pacman_packages="openssh".  Though It still gives the same error ^.

Edited by RusticPotato
Used wrong variable, should be using AOR not AUR. Error still persists.
Link to comment
 
Yea only need to use the client not server.   I added openssh to aur_packages (eg aur_packages="openssh") in the example-startup-script.sh and the container wont start now:
 
2021-08-02 13:13:19.579191 [info] BIND_CLOUD_NAME not defined,(via -e BIND_CLOUD_NAME)2021-08-02 13:13:19.613992 [info] ENABLE_STARTUP_SCRIPTS defined as 'yes'cp: cannot stat '/home/nobody/scripts/*.sh': No such file or directory

 
* I should have put it in the AOR variable, pacman_packages="openssh".  Though It still gives the same error ^.

There was a bug around this, please do a force update

Sent from my CLT-L09 using Tapatalk

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.