dotnet / dotnet/command-line-api

[dotnet-suggest] Support for Docker runtime-deps:alpine

Open
#1,863 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Trying to ship a CLI (self-contained .net app) using Docker image `mcr.microsoft.com/dotnet/runtime-deps:6.0.9-alpine3.16-amd64`.
The choice of this image is to be as lightweight as possible.

The first problem is that `dotnet` command is not available to install using
`RUN dotnet tool install -g dotnet-suggest`.

When using a separate image (like `mcr.microsoft.com/dotnet/sdk:6.0.401-alpine3.16-amd64`) there's a couple of issues with that:
- `/root/.dotnet/tools` is not added to the PATH ([I guess referencing this issue](https://github.com/dotnet/dotnet-docker/issues/520))
- The second part is that dotnet-suggest does not seem to work at all on alpine ([my other guess is we need this PR to land first](https://github.com/dotnet/command-line-api/pull/1673))
- The last thing is the shim needed. dotnet suggest currently support `Bash|PowerShell|Zsh`, but I think the default for Alpine is Ash.

Overall, we need a simple way to ship a self-contained .net app, with dotnet-suggest pre-configured on Docker, to reduce the burden to set it up for users.

Thanks

Contributor guide

Open the contributing guide

Research direction

The issue names dotnet-suggest, Docker runtime-deps:alpine and sdk images, the dotnet tool install command, PATH setup, Alpine support, and Bash|PowerShell|Zsh shims. Start by reproducing the installation and invocation on the stated Alpine images, then trace the existing shell shim entry points. Done means a self-contained .NET app can ship with dotnet-suggest pre-configured on Alpine without these setup problems.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, linux
Domain
cli, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.