Skip to content

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

Open
@TiemenSch

Description

@TiemenSch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions