binhex Posted June 18, 2021 Share Posted June 18, 2021 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 😁 For other Docker support threads and requests, news and Docker template support for the binhex repository please use the "General" thread here 1 Quote Link to comment
binhex Posted June 18, 2021 Author Share Posted June 18, 2021 Please check the FAQ before posting:- https://github.com/binhex/documentation/blob/master/docker/faq/code-server.md Quote Link to comment
neupsh Posted June 23, 2021 Share Posted June 23, 2021 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. Quote Link to comment
Lohisa Posted June 28, 2021 Share Posted June 28, 2021 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. Quote Link to comment
binhex Posted June 28, 2021 Author Share Posted June 28, 2021 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. Quote Link to comment
binhex Posted June 28, 2021 Author Share Posted June 28, 2021 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. 1 Quote Link to comment
Lohisa Posted June 28, 2021 Share Posted June 28, 2021 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. Quote Link to comment
binhex Posted July 28, 2021 Author Share Posted July 28, 2021 hi guys, i have relaxed the restriction about adding in additional packages, you can now do this if required, see Q5:- https://github.com/binhex/documentation/blob/master/docker/faq/code-server.md Quote Link to comment
RusticPotato Posted July 29, 2021 Share Posted July 29, 2021 (edited) 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 July 29, 2021 by RusticPotato found the bug Quote Link to comment
binhex Posted July 30, 2021 Author Share Posted July 30, 2021 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. Quote Link to comment
RusticPotato Posted July 30, 2021 Share Posted July 30, 2021 4 hours ago, binhex said: thanks for this, i have confirmed your fix works so pushed it out and currently rebuilding the image. Welcome. I rebuilt my container and it's working perfectly. Thanks! Quote Link to comment
RusticPotato Posted August 1, 2021 Share Posted August 1, 2021 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. Quote Link to comment
binhex Posted August 2, 2021 Author Share Posted August 2, 2021 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. Quote Link to comment
RusticPotato Posted August 2, 2021 Share Posted August 2, 2021 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 . Quote Link to comment
binhex Posted August 2, 2021 Author Share Posted August 2, 2021 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. Quote Link to comment
RusticPotato Posted August 2, 2021 Share Posted August 2, 2021 (edited) 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 August 2, 2021 by RusticPotato Used wrong variable, should be using AOR not AUR. Error still persists. Quote Link to comment
binhex Posted August 2, 2021 Author Share Posted August 2, 2021 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 updateSent from my CLT-L09 using Tapatalk Quote Link to comment
RusticPotato Posted August 2, 2021 Share Posted August 2, 2021 1 hour ago, binhex said: There was a bug around this, please do a force update Thanks! It's working now. Quote Link to comment
Agent531C Posted October 15, 2021 Share Posted October 15, 2021 I seem to be having an issue setting up the Code Server behind NGinx. I've set the 'Self SIgned Cert' to no, and all of my other cert path fields are blank as the FAQ suggests. When I try to log in from my domain, I can log in via the password then get this error: The workbench failed to connect to the server (Error: WebSocket close with status code 1006) These are some of the browser console outputs that happen: ERR WebSocket close with status code 1006: L@https://dev.domain.net/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/lib/code-server/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:130012 <@https://dev.domain.net/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/lib/code-sever/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:131742 log.ts:301:11 Uncaught (in promise) Error: WebSocket close with status code 1006 L remoteAuthorityResolver.ts:72 E browserSocketFactory.ts:148 Is there some extra config work that needs to be done in the advanced area of the Nginx Entry to make it work? There's no info in the logs, and Ive got websockets enabled in cloudflare, so that shouldn't be the source of the issue. Quote Link to comment
RusticPotato Posted October 15, 2021 Share Posted October 15, 2021 1 hour ago, Agent531C said: Is there some extra config work that needs to be done in the advanced area Not sure if this is your issue but I had to do some work with my internal dns to make sure it didn't try and use the public ip, and used the private ip, as I don't have the port 8500 exposed publicly. In my pihole dns I pointed my dns domain names point to the local ip. Quote Link to comment
Agent531C Posted October 17, 2021 Share Posted October 17, 2021 On 10/15/2021 at 10:01 AM, Agent531C said: I seem to be having an issue setting up the Code Server behind NGinx. I've set the 'Self SIgned Cert' to no, and all of my other cert path fields are blank as the FAQ suggests. When I try to log in from my domain, I can log in via the password then get this error: The workbench failed to connect to the server (Error: WebSocket close with status code 1006) These are some of the browser console outputs that happen: ERR WebSocket close with status code 1006: L@https://dev.domain.net/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/lib/code-server/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:130012 <@https://dev.domain.net/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/lib/code-sever/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:131742 log.ts:301:11 Uncaught (in promise) Error: WebSocket close with status code 1006 L remoteAuthorityResolver.ts:72 E browserSocketFactory.ts:148 Is there some extra config work that needs to be done in the advanced area of the Nginx Entry to make it work? There's no info in the logs, and Ive got websockets enabled in cloudflare, so that shouldn't be the source of the issue. For anyone that returns to this topic looking for advice, I ended up going back to an older version of Ubuntu and using an xrdp install script to get it all set up. It functions properly now, but Ubuntu 21.10 had issues with it. Quote Link to comment
flake Posted February 22, 2022 Share Posted February 22, 2022 (edited) I added the docker yesterday and continually get disconnected every minute with the following entry in the log. I'm using SWAG. From reading the FAQ if I set the use self cert to no then the coder server becomes unavailable, if I set it to yes then I can access the code server as normal but experience this issue. [2022-02-22 11:23:35.735] [remoteagent] [error] [172.19.0.5][028827a7][ExtensionHostConnection] Unknown reconnection token (seen before). [2022-02-22 11:23:35.744] [remoteagent] [info] [172.19.0.5][0242f291][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed. [2022-02-22 11:30:07.315] [remoteagent] [info] [172.19.0.5][de3cee2d][ManagementConnection] New connection established. Edited February 22, 2022 by flake Quote Link to comment
binhex Posted February 22, 2022 Author Share Posted February 22, 2022 5 minutes ago, flake said: I added the docker yesterday and continually get disconnected every minute with the following entry in the log. I'm using SWAG. From reading the FAQ if I set the use self cert to no then the coder server becomes unavailable, if I set it to yes then I can access the code server as normal but experience this issue. [2022-02-22 11:23:35.735] [remoteagent] [error] [172.19.0.5][028827a7][ExtensionHostConnection] Unknown reconnection token (seen before). [2022-02-22 11:23:35.744] [remoteagent] [info] [172.19.0.5][0242f291][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed. [2022-02-22 11:30:07.315] [remoteagent] [info] [172.19.0.5][de3cee2d][ManagementConnection] New connection established. this is a bug in code-server, its hopefully going to be fixed, for the time being roll back to tag version '3.12.0-0-01' if you dont know how to ref a tag then see Q5:- https://github.com/binhex/documentation/blob/master/docker/faq/unraid.md Quote Link to comment
flake Posted February 22, 2022 Share Posted February 22, 2022 32 minutes ago, binhex said: this is a bug in code-server, its hopefully going to be fixed, for the time being roll back to tag version '3.12.0-0-01' if you dont know how to ref a tag then see Q5:- https://github.com/binhex/documentation/blob/master/docker/faq/unraid.md Thanks, that resolved the issue Quote Link to comment
Masterwishx Posted March 11, 2022 Share Posted March 11, 2022 (edited) i have docker command not found in terminal of vscode ,is i missing something ? Edited March 11, 2022 by Masterwishx Quote Link to comment
Recommended Posts
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.