Code Monkey home page Code Monkey logo

Comments (20)

Nefcanto avatar Nefcanto commented on July 21, 2024

I installed .NET Core on your image and now I also get this error:

/usr/share/dotnet/sdk/3.1.412/NuGet.targets(557,5): error : Unable to obtain lock file access on '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' for operations on '/config/.nuget/NuGet/NuGet.Config'. This may mean that a different user or administator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' will allow NuGet to continue. [/Company/Customers/Models/Models.csproj]

How can we run your image as root?

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

And I also get this error:

Unable to create 'launch.json' file inside the '.vscode' folder (Unable to write file 'vscode-remote://0.0.0.0:8443/Company/.vscode/launch.json' (NoPermissions (FileSystemError): Error: EACCES: permission denied, mkdir '/Company/.vscode')).

It's all about permissions.

from docker-code-server.

Roxedus avatar Roxedus commented on July 21, 2024

You yet have to provide good information. We want your container logs, and the compose you used.

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

My compose:

version: "2.1"
services:
  code-server:
    image: linuxserver/code-server
    container_name: code-server
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      #- PASSWORD=password #optional
      #- HASHED_PASSWORD= #optional
      #- SUDO_PASSWORD=password #optional
      #- SUDO_PASSWORD_HASH= #optional
      #- PROXY_DOMAIN=code-server.my.domain #optional
    volumes:
      - /path/to/appdata/config:/config
    ports:
      - 8443:8443
    restart: unless-stopped

As I mentioned above, I have used your docker compoase content. I only commented the optional parts out. And also changed the path of your image from GitHub Container Repository to docker hub.

from docker-code-server.

j0nnymoe avatar j0nnymoe commented on July 21, 2024

So you didn't change this?

      - /path/to/appdata/config:/config

from docker-code-server.

Roxedus avatar Roxedus commented on July 21, 2024

'/Company/AdminApi/Api/Controllers/TicketController.cs' implies you have cloned, or a volume at Company

from docker-code-server.

Roxedus avatar Roxedus commented on July 21, 2024

I installed .NET Core on your image and now I also get this error:

/usr/share/dotnet/sdk/3.1.412/NuGet.targets(557,5): error : Unable to obtain lock file access on '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' for operations on '/config/.nuget/NuGet/NuGet.Config'. This may mean that a different user or administator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' will allow NuGet to continue. [/FreyaCenter/Customers/Models/Models.csproj]

How can we run your image as root?

You don't, you do however have sudo in the image.

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

yes, I added one line to the volumes:

- /Company/AdminApi:/Company/AdminApi

from docker-code-server.

Roxedus avatar Roxedus commented on July 21, 2024

yes, I added one line to the volumes:

- /Company/AdminApi:/Company/AdminApi

An essential thing to tell when seeking support. user 1000 need access to these files, that's why you are seeing permission errors.

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

How can I give you container logs?

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

yes, I added one line to the volumes:
- /Company/AdminApi:/Company/AdminApi

An essential thing to tell when seeking support. user 1000 need access to these files, that's why you are seeing permission errors.

Then how about NuGet? That's outside this volume. And that's something that has been installed as a layer over your image.

I wish you could have a way to support the root user.

from docker-code-server.

Roxedus avatar Roxedus commented on July 21, 2024

yes, I added one line to the volumes:
- /Company/AdminApi:/Company/AdminApi

An essential thing to tell when seeking support. user 1000 need access to these files, that's why you are seeing permission errors.

Then how about NuGet? That's outside this volume. And that's something that has been installed as a layer over your image.

I wish you could have a way to support the root user.

As i mentioned above, sudo

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

When I want to debug or build the project, I hit F5 inside the VS Code.

And it still shows me the unable to obtain lock file access related to NuGet, which is outside of my project directory.

So, basically, I'm stuck at this point. I hit F5 which is not terminal, thus there is no chance to use sudo, and NuGet files and every other file related to .NET SDK is outside of my directory.

What should I do for this?

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

This is the error:

/usr/share/dotnet/sdk/3.1.412/NuGet.targets(557,5): error : Unable to obtain lock file access on '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' for operations on '/config/.nuget/NuGet/NuGet.Config'. This may mean that a different user or administator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' will allow NuGet to continue. [/Company/AdminApi/Api/Api.csproj]

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

And another question, now that I have not configured sudo password (since it was optional) why is it not accepting empty string from me?

sudo dotnet build

This command asks for password and does not accept empty password.

Also whoami returns abc.

from docker-code-server.

Nefcanto avatar Nefcanto commented on July 21, 2024

I recreated the container, this time with a SUDO_PASSWORD set. Now this line works:

sudo dotnet build.

However, in VS Code for debugging purposes we hit F5 and it does not work. Gives me this error:

/usr/share/dotnet/sdk/3.1.412/NuGet.targets(557,5): error : Unable to obtain lock file access on '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' for operations on '/config/.nuget/NuGet/NuGet.Config'. This may mean that a different user or administator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file '/tmp/NuGetScratch/lock/2da39419e35783aea332ab4d2016b9efcf05f4a3' will allow NuGet to continue. [/Company/AdminApi/Api/Api.csproj]

As you can see here, the only difference is that in hitting F5 I have no way to run the command as sudo.

So this decision that you do not let people run your images as root is practically hindering development.

from docker-code-server.

github-actions avatar github-actions commented on July 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from docker-code-server.

drmrbrewer avatar drmrbrewer commented on July 21, 2024

I'd also appreciate the ability to log in as root rather than having to use sudo... a simple USER env var would do the trick.

from docker-code-server.

github-actions avatar github-actions commented on July 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from docker-code-server.

github-actions avatar github-actions commented on July 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from docker-code-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.