Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream ability to run commands as root via repo2docker #2663

Closed
consideRatio opened this issue Jun 15, 2023 · 4 comments
Closed

Upstream ability to run commands as root via repo2docker #2663

consideRatio opened this issue Jun 15, 2023 · 4 comments
Assignees

Comments

@consideRatio
Copy link
Member

Carbonplan has transitioned to use repo2docker and can no longer install code-server which seem to require sudo rights. I responded that we'll explore if we can work this.

https://2i2c.freshdesk.com/a/tickets/758

@yuvipanda
Copy link
Member

I think if this is required, they must use a Dockerfile. repo2docker doesn't quite support this and I don't think it will. I'm also not sure that it is required to install code-server.

@consideRatio
Copy link
Member Author

consideRatio commented Jun 16, 2023

I did some exploring on specifically installing code-server without being root user. It seems it can be installed with npm, but I ran into:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'code-server@4.13.0',
npm WARN EBADENGINE   required: { node: '16' },
npm WARN EBADENGINE   current: { node: 'v18.15.0', npm: '9.5.0' }
npm WARN EBADENGINE }

Apparently supporting node 18 is tracked in coder/code-server#6230.

Considering other options, repo2docker supports the apt.txt file, and code-server exists as a downloadable .deb file, but it is not published via an apt repository so using apt.txt won't work.

@consideRatio
Copy link
Member Author

I just learned that repo2docker has an entrypoint that makes us get logs to ~/.jupyter-server-log.txt which is really helpful for us to help users help themselves instead of needing our help.

I now also ended up opining (jupyterhub/repo2docker#1009 (comment).) if the repo2docker should or shouldn't accept a feature allowing this, I think adding support for a postBuildAsRoot file makes sense. I understand that you and Min disagree though, so unless you or Min agrees of supporting something like that I figure we shouldn't go for it.

@consideRatio
Copy link
Member Author

I found code-server via conda-forge, it helped downgrade node to version 16, and then it worked. I'll communicate this as a resolution to https://2i2c.freshdesk.com/a/tickets/758, and we can close this as I figure we don't need to decide on working on that feature or not if there is agreement to do it upstream.

channels:
  - conda-forge
dependencies:
  - pip
  - python=3.10.*
  - code-server
  - pip:
    - jupyter-vscode-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants