Bug 1410736 - npm build dependency not provided by dotnet image
Summary: npm build dependency not provided by dotnet image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: dotNET
Classification: Red Hat
Component: rh-dotnetcore10-container
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ga
: ---
Assignee: Severin Gehwolf
QA Contact: jiri vanek
Les Williams
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-06 09:44 UTC by Tom Deseyn
Modified: 2017-03-20 08:25 UTC (History)
8 users (show)

Fixed In Version: rh-dotnetcore10-docker-1.0-13
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-20 08:25:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-developer s2i-dotnetcore pull 35 0 None None None 2017-03-13 14:24:46 UTC
Red Hat Product Errata RHBA-2017:0560 0 normal SHIPPED_LIVE updated dotNET container images 2017-03-20 12:34:48 UTC

Description Tom Deseyn 2017-01-06 09:44:59 UTC
When generating a new dotnet web application (on the command line or using visual studio), the resulting code will (not surprisingly) depend on nodejs/npm for the front-end.

This is not included in the dotnet base image.

Comment 1 Tom Deseyn 2017-01-09 14:12:08 UTC
Omair, Severin, your thoughts?

Comment 2 Severin Gehwolf 2017-01-09 16:11:56 UTC
What's the precise reproducer? What's the use case? I'm trying to understand what the actual problem here is.

My understanding was that https://github.com/redhat-developer/s2i-dotnetcore-ex is a generated web app. The above example builds fine into an image using our builder image.

Comment 3 Omair Majid 2017-01-09 16:18:10 UTC
(In reply to Severin Gehwolf from comment #2)
> What's the precise reproducer? What's the use case? I'm trying to understand
> what the actual problem here is.

1. dotnet new -l c# -t web
2. dotnet restore
3. dotnet publish

The last step shows:

Publishing hello-world for .NETCoreApp,Version=v1.1
No executable found matching command "npm"

So, there's an actual dependency on the `npm` tool. Do we even have this available in RHEL? Or would supporting this mean packaging npm and other tools.

Comment 4 Tom Deseyn 2017-01-09 16:32:03 UTC
The s2i-nodejs-container Dockerfile has some npm stuff in it: https://github.com/sclorg/s2i-nodejs-container/blob/master/4/Dockerfile.rhel7

Comment 5 Severin Gehwolf 2017-01-09 16:44:45 UTC
(In reply to Omair Majid from comment #3)
> The last step shows:
> 
> Publishing hello-world for .NETCoreApp,Version=v1.1
> No executable found matching command "npm"

The dependency seems to be "dotnet publish" specific. This works:

$ cat test.in
mkdir hello-world
cd hello-world
dotnet new -l 'c#' -t web
dotnet restore
dotnet run
$ sudo docker run -i dotnet/dotnetcore-11-rhel7 /bin/bash < test.in

This doesn't:

$ cat test.in
mkdir hello-world
cd hello-world
dotnet new -l 'c#' -t web
dotnet restore
dotnet publish

I wonder if https://github.com/redhat-developer/s2i-dotnetcore/pull/30 breaks running the web sample app:
https://github.com/redhat-developer/s2i-dotnetcore-ex

> So, there's an actual dependency on the `npm` tool. Do we even have this
> available in RHEL? Or would supporting this mean packaging npm and other
> tools.

We'd have to add nodejs collection packages (rebuild in our namespace) or depend on that collection.

Comment 6 Tom Deseyn 2017-01-09 16:58:15 UTC
project.json has some publish related tasks:
```
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
```

bower will fetch some front end libraries (bower.json):
```
  "dependencies": {
    "bootstrap": "3.3.6",
    "jquery": "2.2.3",
    "jquery-validation": "1.15.0",
    "jquery-validation-unobtrusive": "3.2.6"
  }

```

gulp will minify the javascript, css (gulpfile.js):
```
gulp.task("min", ["min:js", "min:css"]);
```

The `dotnet run` version is working because it is pulling those files of a CDN. The publish is doing those steps which you only do once for the production version (and which would waste your time during development).

Comment 7 Severin Gehwolf 2017-01-09 17:02:28 UTC
Sounds like this, then:
https://github.com/redhat-developer/s2i-dotnetcore-ex/issues/7

Comment 8 Severin Gehwolf 2017-01-09 17:06:41 UTC
As an interim, I'd still suggest keep using "dotnet build" over "dotnet publish" in the default image assemble script. It has no chance of working anyway at this moment.

Comment 9 Kiersten (Kerri) Anderson 2017-01-12 16:22:55 UTC
Note:
nodejs v6 release schedule, please see rhscl 2.4 in Product Pages. 
nodejs v4 is released.

Comment 17 Tom Deseyn 2017-01-23 10:58:49 UTC
npm added to s2i-dotnetcore: https://github.com/redhat-developer/s2i-dotnetcore/pull/35

Comment 22 zzambers 2017-03-15 18:35:10 UTC
Testsuite passed for both 1.0.4 and 1.1.1

1.0.4
https://bugzilla.redhat.com/show_bug.cgi?id=1430300#c4

1.1.1
https://bugzilla.redhat.com/show_bug.cgi?id=1430310#c4

Comment 24 errata-xmlrpc 2017-03-20 08:25:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0560


Note You need to log in before you can comment on or make changes to this bug.