[Support] Linuxserver.io - Code-server


Recommended Posts

4 hours ago, saarg said:

 

Read the readme section called docker mods.

It's a pity it's so complicated. I didn't really know how to do it.
I need to take three steps in docker terminal.
1. Download file: go1.15.7.linux-amd64.tar.gz
2. Unpack: tar -C /usr/local -xzf go1.15.7.linux-amd64.tar.gz
3. And export: export PATH=$PATH:/usr/local/go/bin

 

Link to comment
2 hours ago, muwahhid said:

It's a pity it's so complicated. I didn't really know how to do it.
I need to take three steps in docker terminal.
1. Download file: go1.15.7.linux-amd64.tar.gz
2. Unpack: tar -C /usr/local -xzf go1.15.7.linux-amd64.tar.gz
3. And export: export PATH=$PATH:/usr/local/go/bin

 

What? I suggest you go back to the readme and read it again.

What you describe above has nothing to do with our docker mods.

Link to comment
  • 3 weeks later...
  • 1 month later...

Hello, I am having trouble getting this container to run on a different port. See here I am trying to set port 443 as the host port:

image.thumb.png.9c18c76116e114f94b3eda6e3c737bdd.png

 

Then, during docker run, it appears to be set correctly:

image.thumb.png.64f654c48cafd275d45e2893b0a37e3f.png

 

But then it still starts on the default port:

image.thumb.png.eb67f5f571328a34af5acb41cbe25b08.png

 

And the logs show the same default port being used, not the set one:

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
starting with no password
[2021-03-18T16:21:31.781Z] info code-server 3.9.1 e0203f2a36c9b7036fefa50eec6cf8fa36c5c015
[2021-03-18T16:21:31.782Z] info Using user-data-dir ~/data
[2021-03-18T16:21:31.798Z] info Using config file ~/.config/code-server/config.yaml
[2021-03-18T16:21:31.798Z] info HTTP server listening on http://0.0.0.0:8443
[2021-03-18T16:21:31.798Z] info - Authentication is disabled
[2021-03-18T16:21:31.798Z] info - Not serving HTTPS

 

How can I get this running on port 443? Is there a limitation where it cannot run on 443/HTTPS?

Edited by dave
Link to comment
4 hours ago, dave said:

Hello, I am having trouble getting this container to run on a different port. See here I am trying to set port 443 as the host port:

image.thumb.png.9c18c76116e114f94b3eda6e3c737bdd.png

 

Then, during docker run, it appears to be set correctly:

image.thumb.png.64f654c48cafd275d45e2893b0a37e3f.png

 

But then it still starts on the default port:

image.thumb.png.eb67f5f571328a34af5acb41cbe25b08.png

 

And the logs show the same default port being used, not the set one:

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
starting with no password
[2021-03-18T16:21:31.781Z] info code-server 3.9.1 e0203f2a36c9b7036fefa50eec6cf8fa36c5c015
[2021-03-18T16:21:31.782Z] info Using user-data-dir ~/data
[2021-03-18T16:21:31.798Z] info Using config file ~/.config/code-server/config.yaml
[2021-03-18T16:21:31.798Z] info HTTP server listening on http://0.0.0.0:8443
[2021-03-18T16:21:31.798Z] info - Authentication is disabled
[2021-03-18T16:21:31.798Z] info - Not serving HTTPS

 

How can I get this running on port 443? Is there a limitation where it cannot run on 443/HTTPS?

That's because you set an IP for the container. Port mapping have no function then, as it's the same as running it in host mode. If you want to use port 443 you have to use bridge network mode.

Link to comment
  • 4 weeks later...

Hello Guys,

 

i successfully installed the docker and Git cloned one of my Mobile project.

However when i tried to npm install it and expo install it, i got error code EACCS with permission denied to /usr/lib/modules.

 

Does anyone of you actually succeeded on creating an node.Js developing environment?

 

edit 1: I saw the Docker mods, so that's working, i need to open a few more ports for expoto work. But it seems a lot smoother than last time i tried

 

edit 2 : I made Expo.io work, but same as node.js , i need to reinstall it everytime. Is there a dockerMods for Expo.io?

Edited by Troussdesoin
update
Link to comment

Set up the linuxserver.io code-server docker and loving how remote it has allowed me to be. However, there's a setting I relating to the intellisense setting for in php (which I code in) that I can't set properly and its been driving me nuts. The setting is php.executablePath. I believe I have the correct path set but for some reason it won't pick it up. To verify that I do have a php executable I went to the terminal and ran whereis and then which. It's spitting back the same executable path that I've put into my code server settings, so I can't figure out why i'm still getting errors. I ran < php -v > and I do have a php version installed, see below. Any help is appreciated.

1068146474_phpvalidate.thumb.png.01a9bc32c1d526ed44941f3bbd7d6c0b.png

 

 

php -v result:

PHP 7.4.15 (cli) (built: Feb 11 2021 09:48:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Link to comment
  • 2 weeks later...

I recently lost and had to rebuild my docker.img file settings in unraid, I had this running perfectly with MODS previously but now I seem to be running into issues.  I assume I have messed up somewhere but I cant seem to locate my error.  A second set of more experienced eyes are welcomed.

 

image.png.f4465f831a463e7f345b6f448d4ecf8c.png

 

[mod-init] Attempting to run Docker Modification Logic
[mod-init] Applying linuxserver/mods:code-server-powershell files to container

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

[mod-init] Applying linuxserver/mods:code-server-python3 files to container

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

 

Link to comment
3 hours ago, flinte said:

I recently lost and had to rebuild my docker.img file settings in unraid, I had this running perfectly with MODS previously but now I seem to be running into issues.  I assume I have messed up somewhere but I cant seem to locate my error.  A second set of more experienced eyes are welcomed.

 

image.png.f4465f831a463e7f345b6f448d4ecf8c.png

 

[mod-init] Attempting to run Docker Modification Logic
[mod-init] Applying linuxserver/mods:code-server-powershell files to container

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

[mod-init] Applying linuxserver/mods:code-server-python3 files to container

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

 

Please post the docker run command so we can see the full picture.

Link to comment
5 minutes ago, saarg said:

Please post the docker run command so we can see the full picture.

 

[email protected]:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='code' --net='reverse-proxy' -e TZ="America/Denver" -e HOST_OS="Unraid" -e 'PASSWORD'='' -e 'SUDO_PASSWORD'='NunY0Businass!' -e 'HTTPS_PROXY'='https://192.168.11.3' -e 'DOCKER_MODS'='linuxserver/mods:code-server-powershell|linuxserver/mods:code-server-python3' -e 'HTTP_PROXY'='http://192.168.11.3' -e 'PUID'='99' -e 'PGID'='100' -p '11443:8443/tcp' -v '/mnt/user/appdata/code-server':'/config':'rw' -v '/mnt/user/software/Scripts':'/workspace':'rw' 'linuxserver/code-server'
8cf52278e45640c43f3a34724c3ae5d55d377d949116ee4b9702f4219b3910ad

The command finished successfully!

 

Link to comment
16 hours ago, flinte said:

 

[email protected]:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='code' --net='reverse-proxy' -e TZ="America/Denver" -e HOST_OS="Unraid" -e 'PASSWORD'='' -e 'SUDO_PASSWORD'='NunY0Businass!' -e 'HTTPS_PROXY'='https://192.168.11.3' -e 'DOCKER_MODS'='linuxserver/mods:code-server-powershell|linuxserver/mods:code-server-python3' -e 'HTTP_PROXY'='http://192.168.11.3' -e 'PUID'='99' -e 'PGID'='100' -p '11443:8443/tcp' -v '/mnt/user/appdata/code-server':'/config':'rw' -v '/mnt/user/software/Scripts':'/workspace':'rw' 'linuxserver/code-server'
8cf52278e45640c43f3a34724c3ae5d55d377d949116ee4b9702f4219b3910ad

The command finished successfully!

 

Where did you get the http and https proxy env variables from? That's not something from our container.

Link to comment
On 5/1/2021 at 7:07 AM, saarg said:

Where did you get the http and https proxy env variables from? That's not something from our container.

I am unsure.  I thought I got it from your dockerhub page .. regardless removal of these lines worked

Link to comment
  • 4 weeks later...

Hello,

 
I am trying to do some C++ coding and compiling.  In order to get g++ (compiler) I went through the terminal and installed it and it's dependancies.  It worked fine and then I updated the container and now it's gone.  I assume this is due to the lack of persistence in the container.  Is the best way to have this work everytime I startup the container to alter the script?   

 

If so, is the script persistent every time I update the container or do I need to do extra work to save the script?  Is there a better way to do this?  Sorry - I know this is a more general container question but I'm thinking someone else had this issue very specific to the container so I thought I'd start here.

 

Thanks!

Link to comment
On 5/31/2021 at 5:16 PM, Vaslo said:

Hello,

 
I am trying to do some C++ coding and compiling.  In order to get g++ (compiler) I went through the terminal and installed it and it's dependancies.  It worked fine and then I updated the container and now it's gone.  I assume this is due to the lack of persistence in the container.  Is the best way to have this work everytime I startup the container to alter the script?   

 

If so, is the script persistent every time I update the container or do I need to do extra work to save the script?  Is there a better way to do this?  Sorry - I know this is a more general container question but I'm thinking someone else had this issue very specific to the container so I thought I'd start here.

 

Thanks!

Using the script function it will survive updates.

Link to comment
  • 2 weeks later...
  • 1 month later...
  • 1 month later...

Did anyone managed to get SUDO_PASSWORD_HASH working? I'm using the same instruction as HASHED_PASSWORD (different password). The hashed password worked but I was not able to sudo. It kept saying my password was wrong.

 

Method: echo -n "thisismypassword" | npx argon2-cli -e

 

I was able to set a sudo password plaintext by using SUDO_PASSWORD but I would like to hash it.

Edited by josephsiu
Link to comment

Hello,
To make the SUDO_PASSWORD_HASH work, you have to generate it.
For example:

openssl passwd -6 -salt RANDOM_STRING_USED_AS_SALT YOURPASSWORD

(-6 for sha512, -5 for sha256)
You will get a string in this format: $type$salt$hashed (as documented)
If you use docker-compose, don't forget to put $$ instead of $ in the environment variable: $$6$$SALT$$HASHEDPASSWORD

The password will be set in /etc/shadow.

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.