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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.