dotnet / dotnet/dotnet-docker

Official docker image including tooling dependencies required for web workloads

Open
#3,909 8 comments 5 reactions 0 assignees View on GitHub
area-samples
Dominant language
Dockerfile
Stars
4.9k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
26

Description

### Describe the Problem

Using NodeJS and similar tools is very common in web projects including the templates that we support out of the box for building single page applications using Angular and React with an ASP.NET Core backend.

### Describe the Solution

It will be great if the official images can contain the tools required for supporting building web workloads (essentially node an NPM) or if we can provide an additional official image that includes these tools. For example, a variant `mcr.microsoft.com/dotnet/sdk-web` so that users in their docker file can do like below

```
FROM mcr.microsoft.com/dotnet/sdk-web:6.0 AS build
...
```

### Additional Context

Currently, users need to figure out how to build the app and they are forced to update their dockerfile to properly build web projects as follows:

```dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-with-spa
RUN bash -E $(curl -fsSL https://deb.nodesource.com/setup_18.x | bash - ); apt install -y nodejs

From build-with-spa as build
...
```

There are obvious drawbacks to this, as the user needs to figure this out from the docs or by themselves.

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.