Dotnet-docker: Unable to publish ASP.NET Core application - bower & npm is missing

Created on 12 Nov 2016  路  4Comments  路  Source: dotnet/dotnet-docker

Steps to reproduce the issue

  1. Create a new ASP.NET Core project using dotnet new -t web
  2. Create standard Dockerfile inside project folder, as described in your readme https://github.com/dotnet/dotnet-docker#build-and-run-an-application-with-a-net-core-sdk-image
  3. Run docker build . -t foobar

Expected behavior

ASP.NET Core project is built and published into the docker image

Actual behavior

ERROR:
No executable found matching command "npm" The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1

Additional information (e.g. issue happens only occasionally)

Note I have tried with the microsoft/aspnetcore base image and same problem as there is no npm/bower installed.

Output of docker version

Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 22:01:48 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 22:01:48 2016
 OS/Arch:      linux/amd64

Output of docker info

Containers: 4
 Running: 0
 Paused: 0
 Stopped: 4
Images: 13
Server Version: 1.12.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 33
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge overlay null host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-45-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 667.3 MiB
Name: testvm
ID: 5U5L:R2X3:SMA5:SC6R:IOYM:MZON:7IZD:E4ZL:5OK5:ZBRA:GO5R:ON7W
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
 127.0.0.0/8

Most helpful comment

I think the ASP.NET build image has NPM and friends: https://hub.docker.com/r/microsoft/aspnetcore-build/

All 4 comments

I think the ASP.NET build image has NPM and friends: https://hub.docker.com/r/microsoft/aspnetcore-build/

@friism Thank you! I hadn't found that image, it's not linked to or referenced on either the microsoft/aspnetcore or microsoft/dotnet image pages on Dockerhub.

cc @glennc

I am going to do a PR to the README on Dockerhub now that will link the two images together. Help people find what they need.

Was this page helpful?
0 / 5 - 0 ratings