[Support] binhex - Code-Server


Recommended Posts

Hello. I have created a container using the following command:
docker run 
  -d 
  --name='binhex-code-server' 
  --net='bridge' 
  -e TZ="Asia/Shanghai" 
  -e HOST_OS="Unraid" 
  -e HOST_HOSTNAME="Blueness-NAS" 
  -e HOST_CONTAINERNAME="binhex-code-server" 
  -e 'CERT_PATH'='' 
  -e 'CERT_KEY_PATH'='' 
  -e 'SELF_SIGNED_CERT'='no' 
  -e 'BIND_CLOUD_NAME'='' 
  -e 'ENABLE_STARTUP_SCRIPTS'='yes' 
  -e 'PASSWORD'='XXXXX' 
  -e 'UMASK'='000' 
  -e 'PUID'='99' 
  -e 'PGID'='100' 
  -l net.unraid.docker.managed=dockerman 
  -l net.unraid.docker.webui='https://[iP]:[PORT:8500]/' 
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/binhex/docker-templates/master/binhex/images/code-server-icon.png' 
  -p '8500:8500/tcp' 
  -v '/mnt/user/appdata/data':'/data':'rw' 
  -v '/mnt/user/appdata/binhex-code-server':'/config':'rw' 'binhex/arch-code-server'

However, I am unable to use the account sync feature in vscode. When I click on the "Accounts" button and select "Turn on cloud changes...", nothing happens. Currently, I am accessing the service through a Cloudflare tunnel.
Thanks
I think this is a limitation of code server, feel free to post the issue on the code server GitHub repo.

Sent from my 22021211RG using Tapatalk

Link to comment
13 hours ago, dianasta said:

Hello,

 

Does anyone know how to solve this php error in the container "PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath" ?

 

image.png.95bcf94098d99550cfc97bd2ecb29853.png

As the error states you do not have PHP 7 installed, to fix it you can install this in the container by editing the script in /config/code-server/scripts/example-startup-script.sh, the script explains what to do, if you get stuck let me know.

Link to comment
5 hours ago, binhex said:

As the error states you do not have PHP 7 installed, to fix it you can install this in the container by editing the script in /config/code-server/scripts/example-startup-script.sh, the script explains what to do, if you get stuck let me know.

Excellent thanks works great! 

  • Like 1
Link to comment
  • 2 weeks later...
On 7/22/2022 at 11:38 AM, Masterwishx said:

Is Some one using "docker" and "remote SSH" with this code server ?

I thought I needed this... and I would to use this container... but I don't even need a container. I made a local .code-space file on my desktop computer that connects to UNRAID and launches Code remotely. I store the code-space on /boot and my repo is in /mnt/user so it's backed up with parity. You can execute and shell things right in Unraid through VS code. I can open VS code in Windows with my .code-space and it will remote to UNRAID and load all of my extensions.  

I don't need things like nodejs or perl, so I'm not concerned about the consistent environment, but if anyone else is just looking for a quick fix, this works easy.

Link to comment
  • 2 months later...

text  error  warn  system  array  login  

Created by...
___.   .__       .__
\_ |__ |__| ____ |  |__   ____ ___  ___
 | __ \|  |/    \|  |  \_/ __ \\  \/  /
 | \_\ \  |   |  \   Y  \  ___/ >    <
 |___  /__|___|  /___|  /\___  >__/\_ \
     \/        \/     \/     \/      \/
  https://hub.docker.com/u/binhex/

2023-09-23 13:35:54.832351 [info] Host is running unRAID
2023-09-23 13:35:54.860969 [info] System information Linux 909f089a7aec 6.1.49-Unraid #1 SMP PREEMPT_DYNAMIC Wed Aug 30 09:42:35 PDT 2023 x86_64 GNU/Linux
2023-09-23 13:35:54.896690 [info] OS_ARCH defined as 'x86-64'
2023-09-23 13:35:54.932186 [info] PUID defined as '99'
2023-09-23 13:35:54.987635 [info] PGID defined as '100'
2023-09-23 13:35:55.045248 [info] UMASK defined as '000'
2023-09-23 13:35:55.076804 [info] Permissions already set for '/config'
2023-09-23 13:35:55.111988 [info] Deleting files in /tmp (non recursive)...
2023-09-23 13:35:55.148702 [warn] PASSWORD defined as 'code-server' is weak, please consider using a stronger password
2023-09-23 13:35:55.180505 [info] CERT_PATH not defined,(via -e CERT_PATH)
2023-09-23 13:35:55.212318 [info] CERT_KEY_PATH not defined,(via -e CERT_KEY_PATH)
2023-09-23 13:35:55.243994 [info] SELF_SIGNED_CERT defined as 'yes'
2023-09-23 13:35:55.275770 [info] BIND_CLOUD_NAME not defined,(via -e BIND_CLOUD_NAME)
2023-09-23 13:35:55.308039 [info] ENABLE_STARTUP_SCRIPTS defined as 'yes'
2023-09-23 13:35:55.561836 [info] Starting Supervisor...
2023-09-23 13:35:55,816 INFO Included extra file "/etc/supervisor/conf.d/code-server.conf" during parsing
2023-09-23 13:35:55,817 INFO Set uid to user 0 succeeded
2023-09-23 13:35:55,824 INFO supervisord started with pid 7
2023-09-23 13:35:56,827 INFO spawned: 'start-script' with pid 111
2023-09-23 13:35:56,832 INFO reaped unknown pid 8 (exit status 0)
2023-09-23 13:35:57,452 DEBG 'start-script' stderr output:
[2023-09-23T20:35:57.451Z] error RSA PRIVATE KEY not found from openssl output:
---stdout---
-----BEGIN PRIVATE KEY-----
Deleted this part.
-----END PRIVATE KEY-----

---stderr---

code: 0

2023-09-23 13:35:57,452 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-09-23 13:35:57,464 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 23167912898640 for <Subprocess at 23167912899856 with name start-script in state RUNNING> (stdout)>
2023-09-23 13:35:57,464 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 23167913674960 for <Subprocess at 23167912899856 with name start-script in state RUNNING> (stderr)>
2023-09-23 13:35:57,465 WARN exited: start-script (exit status 1; not expected)
2023-09-23 13:35:57,465 DEBG received SIGCHLD indicating a child quit
 

Link to comment
  • 2 months later...
  • 2 weeks later...

When running `docker`, I get command not found:

 

[nobody@aaa568c660eb appdata]$ docker
bash: docker: command not found

I also tried deleting my config file in appdata and re-installing the app but it still doesn't seem to install it.

 

After adding pacman_packages="docker", I tried restarting the container and force updating it, but no luck.

Link to comment
7 minutes ago, Droppisalt said:

When running `docker`, I get command not found:

 

[nobody@aaa568c660eb appdata]$ docker
bash: docker: command not found

I also tried deleting my config file in appdata and re-installing the app but it still doesn't seem to install it.

 

After adding pacman_packages="docker", I tried restarting the container and force updating it, but no luck.

ok please attach /config/supervisord.log

Link to comment
4 minutes ago, Droppisalt said:

Ah! wasn't executable... working now! I knew it'd be something I missed haha Thanks!

glad its working, i had a look at my code and i actually do the chmod and chown for you and i just tested it by creating a blank file with a .sh extension and it did indeed work as expected, sorting out ownership and permissions, so i am baffled as to why this wasn't the case for you.

Link to comment

oh and btw if what you are trying to achieve is interaction with the docker containers running on unraid from within vs code then there are a couple more hoops to jump through.

 

hoop 1. - create a container path to the docker socket - this is done by adding in a 'path' to your container, set the host and container path both to be the following:-
 

/var/run/docker.sock

 

hoop 2. - grant permissions to docker socket from vs code - this is done by adding the following to your startup script:-
 

# permit user nobody access to docker socket
chmod 777 '/var/run/docker.sock'


thats it!, you can then remote into your containers, stop, start etc etc all within vs code.

Link to comment

Really have no idea either, hoping it's just a one-off. And thank you, needed that last part.

3 minutes ago, binhex said:

hoop 2. - grant permissions to docker socket from vs code - this is done by adding the following to your startup script:-

 

# permit user nobody access to docker socket
chmod 777 '/var/run/docker.sock'


thats it!, you can then remote into your containers, stop, start etc etc all within vs code.

 

Other question, what is the default sudo password?

Link to comment
  • 2 months later...

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.