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

https://code-server.dev/install.sh selects Fedora instead of Debian #7257

Open
1 of 2 tasks
TiemenSch opened this issue Mar 11, 2025 · 0 comments
Open
1 of 2 tasks

https://code-server.dev/install.sh selects Fedora instead of Debian #7257

TiemenSch opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@TiemenSch
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: n.a.
  • Local OS: n.a.
  • Remote OS: Debian
  • Remote Architecture: amd64
  • code-server --version: latest
  • docker-image: python:3-slim

I tried installing code-server in a Dockerfile using https://code-server.dev/install.sh on the official Python docker image python:3-slim and the install script thought it was Fedora based instead of Debian (it's bookworm).

I ended up mixing and matching install snippets from the website and the install.sh contents, which probably is slightly better practice anyway:

RUN CODER_VERSION="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/coder/code-server/releases/latest)" \
    && CODER_VERSION="${CODER_VERSION#https://github.com/coder/code-server/releases/tag/}" \
    && CODER_VERSION="${CODER_VERSION#v}" \
    && mkdir -p ${HOME}/.cache \
    && cd ${HOME}/.cache \
    && curl -fOL https://github.com/coder/code-server/releases/download/v${CODER_VERSION}/code-server_${CODER_VERSION}_amd64.deb \
    && dpkg -i code-server_${CODER_VERSION}_amd64.deb \
    && rm -rf ${HOME}/.cache

Distro detection seems to need a patch, though.

Steps to Reproduce

  1. FROM python:3-slim
  2. RUN curl -fsSL https://code-server.dev/install.sh | sh

Expected

STEP 5/20: RUN curl -fsSL https://code-server.dev/install.sh | sh     && rm -rf /home/**/.cache/
Debian GNU/Linux 12 (bookworm)
Installing v4.97.2 of the amd64 deb package from GitHub.
+ mkdir -p ~/.cache/code-server
+ curl -#fL -o ~/.cache/code-server/code-server_4.97.2_amd64.deb.incomplete -C - https://github.com/coder/code-server/releases/download/v4.97.2/code-server_4.97.2_amd64.deb
######################################################################## 100.0%
+ mv ~/.cache/code-server/code-server_4.97.2_amd64.deb.incomplete ~/.cache/code-server/code-server_4.97.2_amd64.deb
+ dpkg -i ~/.cache/code-server/code-server_4.97.2_amd64.deb
Selecting previously unselected package code-server.
(Reading database ... 33940 files and directories currently installed.)
Preparing to unpack .../code-server_4.97.2_amd64.deb ...
Unpacking code-server (4.97.2) ...
Setting up code-server (4.97.2) ...
deb package has been installed.
To have systemd start code-server now and restart on boot:
  sudo systemctl enable --now code-server@$USER
Or, if you don't want/need a background service you can run:
  code-server
Deploy code-server for your team with Coder: https://github.com/coder/coder

Actual

STEP 5/20: RUN curl -fsSL https://code-server.dev/install.sh | sh     && rm -rf /home/**/.cache/
Fedora Linux 41 (Container Image)
Installing v4.97.2 of the amd64 rpm package from GitHub.
+ mkdir -p ~/.cache/code-server
+ curl -#fL -o ~/.cache/code-server/code-server-4.97.2-amd64.rpm.incomplete -C - https://github.com/coder/code-server/releases/download/v4.97.2/code-server-4.97.2-amd64.rpm
######################################################################## 100.0%
+ mv ~/.cache/code-server/code-server-4.97.2-amd64.rpm.incomplete ~/.cache/code-server/code-server-4.97.2-amd64.rpm
+ rpm -U ~/.cache/code-server/code-server-4.97.2-amd64.rpm
sh: 1: rpm: not found
subprocess exited with status 127
subprocess exited with status 127
Error: building at STEP "RUN curl -fsSL https://code-server.dev/install.sh | sh     && rm -rf /home/**/.cache/": exit status 127

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

@TiemenSch TiemenSch added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant