Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Working example using Visual Studio 2017 and docker? #768

@fbeltrao

Description

@fbeltrao

Hi there,

I am struggling trying to run the template application inside Docker.
Looks to me that JavaScriptServices can't find nodejs on the docker image microsoft/aspnetcore:1.1

I get the error "An exception of type 'System.AggregateException' occurred in System.Private.CoreLib.ni.dll but was not handled in user code"

I tried to modify the Dockerfile adding nodejs the following way:
FROM microsoft/aspnetcore:1.1
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
#debian installs node as nodejs
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "MyApp.dll"]

Still without success.

Using the following dockerfile works (because the docker image has nodejs installed):
FROM microsoft/aspnetcore-build
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "MyApp.dll"]

I just think it is overkill to have this 1.19GB image (compared to 268 MB from aspnetcore) just to run the aspnetcore + nodejs.

Would it be possible to create a sample application where Docker is working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions