[Support] Linuxserver.io - Code-server


197 posts in this topic Last Reply

Recommended Posts

  • Replies 196
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

We have not made a proxy confs for subdirectory. Didn't find an option to set a prefix for subfolder in code-servers documentation.

Root access in gui terminal is not very secure, the official container running as root is also not secure.   If you want to add packages to this container and you want them to be persistent,

Code server is hosting their own marketplace because the licenses prevent them from accessing the official Microsoft marketplace. There may be some issues with some of the extensions. You should repor

Posted Images

  • 2 weeks later...
3 hours ago, cyberspectre said:

Is anyone successfully using this with a Git repo on their array? For me, it lists hundreds of unstaged changes, which is incorrect. The same does not occur with vscode on Windows accessing the directory from a share.

I have been doing all my linuxserver.io development through this image for a while. I work on dozens of git repos and it works just fine. Make sure the config folder is on a /mnt/cache or /mnt/diskX location. Fuse on unraid may cause issues

Link to post
22 hours ago, aptalca said:

I have been doing all my linuxserver.io development through this image for a while. I work on dozens of git repos and it works just fine. Make sure the config folder is on a /mnt/cache or /mnt/diskX location. Fuse on unraid may cause issues

Thanks. The config folder is set up as follows, which is default:

"Appdata"
Host path: /mnt/cache/appdata/code-server
Container path: /config

Then, I added another path to access my repos, like so:

"Files"
Host path: /mnt/disk1
Container path: /media/projects

Still experiencing the same problem. It shows every file that has ever been changed, as an unstaged change. Like it isn't recognizing past commits. Is the above configuration causing it?

Edited by cyberspectre
Link to post
  • 3 weeks later...
On 2/21/2020 at 4:42 PM, cyberspectre said:

Thanks. The config folder is set up as follows, which is default:


"Appdata"
Host path: /mnt/cache/appdata/code-server
Container path: /config

Then, I added another path to access my repos, like so:


"Files"
Host path: /mnt/disk1
Container path: /media/projects

Still experiencing the same problem. It shows every file that has ever been changed, as an unstaged change. Like it isn't recognizing past commits. Is the above configuration causing it?

I'm a dummy. It was because I moved the repo over from a different filesystem, and the permissions on all files changed.

Link to post
  • 2 weeks later...
47 minutes ago, CyberMew said:

Do I have to add a new volume mapping? The default current save directory is loading 


/config/workspace/Untitled-1

which I don't think is correct..? The user can traverse upwards and expose the config folder...

Why isn't that correct?

 

Link to post

This is the default Save folder. Which is saved inside the config folder for the container data. Feels wrong to me, especially if the user can just navigate to upper folder easily (on a desktop). Is there a way to hide it? Change the default folder? 

A2CD083D-7079-4A75-92D9-C275B8503C44.png

Link to post
4 hours ago, CyberMew said:

This is the default Save folder. Which is saved inside the config folder for the container data. Feels wrong to me, especially if the user can just navigate to upper folder easily (on a desktop). Is there a way to hide it? Change the default folder? 

A2CD083D-7079-4A75-92D9-C275B8503C44.png

You might be able to change the default folder, but then you have to check out the code-server documentation.

 

This isn't a multiuser software so /config will always be available to the user using code-server. If that feels wrong to you, you have to find another alternative to code-server.

Link to post

@CyberMew

 

I don't know how much you used code-server, or vscode for that matter, but when you open a terminal, you have access to the entire container. Same as when you open the terminal on a bare metal install of vscode, you have access to the entire machine contents.

 

So I genuinely don't understand what your expectations are here.

Link to post

I thought that it was “disposable” and it would be great if it was in “incognito” mode everytime for just playing around. I just didn’t want the config folder to be the default folder since it isn’t multi tenant(?). I will figure out if it’s possible to change the default save directory to a folder that I will map it to. At the very least that will indicate users not to touch anything outside of my sandbox folder. Thank you both for your inputs. 

Link to post

Hello,

I wanted to configure external access to the container through reverseproxy ... but it won't work, I get to the "LOGIN PAGE" but after login I see only a blank page.

Does someone knows how to fix it?

 

Link to post
36 minutes ago, TDA said:

Hello,

I wanted to configure external access to the container through reverseproxy ... but it won't work, I get to the "LOGIN PAGE" but after login I see only a blank page.

Does someone knows how to fix it?

 

This is what we use with our letsencrypt image: https://github.com/linuxserver/reverse-proxy-confs/blob/master/code-server.subdomain.conf.sample

Link to post
20 minutes ago, aptalca said:

Hello,

Do you know how to implementate it inside Nginx Proxy manager ? (if not - not a problem at all, I'll ask in another post).

 

I've a second question, I've not understood how to implement the FILE__PASSWORD inside your dockers (in uNRAID)

Link to post
1 hour ago, TDA said:

Hello,

Do you know how to implementate it inside Nginx Proxy manager ? (if not - not a problem at all, I'll ask in another post).

 

I've a second question, I've not understood how to implement the FILE__PASSWORD inside your dockers (in uNRAID)

You can ask their dev

 

Map the file somewhere (or use docker secrets) and pass the location in an environment variable

Link to post
10 minutes ago, aptalca said:

You can ask their dev

 

Map the file somewhere (or use docker secrets) and pass the location in an environment variable

Hello, but Docker secrets aren't only for swarm?

And with your Template - how I have to pass the variable?

 

This one is the Variable that come with the template.

image.thumb.png.34ccc373867bb2c3eab3c538cea90778.png

Link to post
6 hours ago, TDA said:

Hello, but Docker secrets aren't only for swarm?

And with your Template - how I have to pass the variable?

 

This one is the Variable that come with the template.

image.thumb.png.34ccc373867bb2c3eab3c538cea90778.png

With docker compose you can. Anyway, that was just an option listed, not a recommendation.

 

For the second, you need to look at docker faqs. It's an unraid thing but in a nutshell, you use the key/value to set the variables and you can add as many as you like (volume mappings, too).

Edited by aptalca
Link to post

I used Dockermod to install python3, however I would like to install some python libraries and want to make sure I'm doing this the best way.

Do I create a folder called custom-cont-init.d and inside create a file with the library name? For example 99-pandas and the script would be something like 

#!/usr/bin/with-contenv bash

echo "**** installing pandas****"
pip3 install pandas

Edit: I find this not working because it tries to run my custom-cont-init.d prior to the dockermods which is throwing me back with an error pip3 command not found

Edited by bobokun
Link to post
4 hours ago, bobokun said:

I used Dockermod to install python3, however I would like to install some python libraries and want to make sure I'm doing this the best way.

Do I create a folder called custom-cont-init.d and inside create a file with the library name? For example 99-pandas and the script would be something like 


#!/usr/bin/with-contenv bash

echo "**** installing pandas****"
pip3 install pandas

Edit: I find this not working because it tries to run my custom-cont-init.d prior to the dockermods which is throwing me back with an error pip3 command not found

You bring up an interesting point I had not considered. s6 supervisor executes the init files in alphabetical order. The custom files in that folder are executed by a script named "99-custom-files" and the python3 docker mod creates an init file named "99-python3" and that's why your custom file is executed before python3 installation.

 

I guess I'll have to update all the mods to use "98-blah" so they execute before the custom files. Until then, restarting the container should fix it for you because on second start, pip will already be installed when your custom file runs.

Link to post
1 hour ago, aptalca said:

You bring up an interesting point I had not considered. s6 supervisor executes the init files in alphabetical order. The custom files in that folder are executed by a script named "99-custom-files" and the python3 docker mod creates an init file named "99-python3" and that's why your custom file is executed before python3 installation.

 

I guess I'll have to update all the mods to use "98-blah" so they execute before the custom files. Until then, restarting the container should fix it for you because on second start, pip will already be installed when your custom file runs.

Yes, thanks! Restarting the container worked. :) Thanks for following up

Link to post

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.