Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Support Alpine Linux #1902

@frenck

Description

@frenck

Environment data

  • Language Server version: Python-Language-Server-linux-x64.0.5.30
  • OS and version: Alpine Linux 3.11
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.4 (source)

Expected behaviour

The language server to start.

Actual behaviour

The server crashes, without any error or warning message that could provide a useful hint to what is going on.

Logs

Downloading https://pvsc.azureedge.net/python-language-server-beta/Python-Language-Server-linux-x64.0.5.30.nupkg...
Language server download complete
Unpacking archive... done
[Error - 10:00:05 AM] Starting client failed
Launching server using command /root/.vscode-server/extensions/ms-python.python-2020.1.58038/languageServer.0.5.30/Microsoft.Python.LanguageServer failed.

I've set the logLevel to Trace, but it has no effect on the output. Would love some guidance on how to get more information out of it.

Code Snippet / Additional lnformation

The Python Language server states in the docs:

The language server can only run on platforms where the .NET Core can run.

Which is great, since Microsoft has a .NET Core for Alpine, however, adding that manually to the container, doesn't help either.

The used Dockerfile

FROM homeassistant/amd64-homeassistant-base:5.4

WORKDIR /usr/src

# Install build tools
RUN apk add --no-cache \
    build-base \
    coreutils \
    procps

# .NET Core dependencies
RUN apk add --no-cache \
    krb5-libs \
    libgcc \
    libintl \
    libssl1.1 \
    libstdc++ \
    zlib

ENV \
    DOTNET_RUNNING_IN_CONTAINER=true \
    DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true

# Install .NET Core
RUN dotnet_version=3.1.1 \
    && wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-x64.tar.gz \
    && dotnet_sha512='73a29e7f6c662beabd70d20bb4331c7a4d3fe4096002cb802f2db08946fd918681151e1cfcda537210231883852364a5c7707e11bbc28d8613ff4ec1a8e98015' \
    && echo "$dotnet_sha512  dotnet.tar.gz" | sha512sum -c - \
    && mkdir -p /usr/share/dotnet \
    && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \
    && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
    && rm dotnet.tar.gz

WORKDIR /workspaces

# Install Python dependencies from requirements
COPY requirements_test.txt requirements_test_pre_commit.txt homeassistant/package_constraints.txt ./
RUN \
    pip3 install \
        --find-links "${WHEELS_LINKS}" \
        -r requirements_test.txt \
        -c package_constraints.txt \
    && rm -f \
        package_constraints.txt \
        requirements_test_pre_commit.txt \
        requirements_test.txt

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash

Upstream PR, where we want to apply this: home-assistant/core#31721

Upstream PR is closed until a solution is found, and does not have dotnet core installed as I have done in the above-provided example, which suffers from the same issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions