Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Docker image is missing NPM, grunt-cli and Git #42

Closed
queue-b opened this issue Mar 17, 2015 · 2 comments
Closed

Docker image is missing NPM, grunt-cli and Git #42

queue-b opened this issue Mar 17, 2015 · 2 comments

Comments

@queue-b
Copy link

queue-b commented Mar 17, 2015

When attempting to build a docker image, the command kpm restore fails when run on an ASP.net vNext project directory generated by Visual Studio 2015.

Command output:

System.ComponentModel.Win32Exception: ApplicationName='npm', CommandLine='install', CurrentDirectory='/usr/src/app/src/Botlink.Api.Server', Native error= Cannot find the specified file
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.ScriptExecutor.Execute (Microsoft.Framework.Runtime.Project project, System.String scriptName, System.Func`2 getVariable) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<RestoreForProject>d__1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Boolean].GetResult () [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<ExecuteCommand>d__1.MoveNext () [0x00000] in <filename unknown>:0 

This is due to the base image missing NPM. Once NPM is installed, the error becomes

System.ComponentModel.Win32Exception: ApplicationName='grunt', CommandLine='bower:install', CurrentDirectory='/usr/src/app/src/Botlink.Api.Server', Native error= Cannot find the specified file
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.ScriptExecutor.Execute (Microsoft.Framework.Runtime.Project project, System.String scriptName, System.Func`2 getVariable) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<RestoreForProject>d__1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Boolean].GetResult () [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<ExecuteCommand>d__1.MoveNext () [0x00000] in <filename unknown>:0 

which indicates that grunt-cli cannot be found. Once grunt-cli is installed, process finishes sucessfully, but there is a complaint by bower that git is missing.

Running "bower:install" (bower) task
Fatal error: git is not installed or not in the PATH

I have a working dockerfile that adds the three tools; I would gladly contribute my changes to aspnet-docker if this is actually an issue and not a deliberate design decision. I would argue that if kpm restore against a Visual Studio project expects NPM, grunt-cli, and git to be installed, they should probably be installed by default in the docker image.

@akoeplinger
Copy link

See #28.

@ahmetb
Copy link
Contributor

ahmetb commented Mar 17, 2015

Closing since duplicate.

@ahmetb ahmetb closed this as completed Mar 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants