8000 GitHub - rod6214/webApplication: This is a ASP.NET Core demo application with Docker
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

rod6214/webApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • Windows 7 or later.
  • Linux Ubuntu 16.04.6 LTS or later.
  • Docker v18.09.2.
  • Nodejs v10.15.3.
  • Angular CLI v7.2.4.
  • .Net Core v2.2 for Windows or Linux.
  • Visual Studio Code or Visual Studio 2017 famiily.

links

Angular installation

  • npm install -g @angular/cli@7.2.4

To generate Angular dependency if you want to edit SPA

Enter into demo/ClientApp directory and invoke the following:

  • npm install

Build angular

Enter into demo/ClientApp directory and invoke the following:

  • ng build --prod --output-hashing none

Build .Net Core App

Enter into demo directory and invoke the following:

  • dotnet build demo.csproj

Run .Net Core App

Enter into demo directory and invoke the following:

  • dotnet run --project demo.csproj

Creating Dockerfile

Enter into demo directory and create dockerfile with the following content:

WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/dotnet:aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "demo.dll"]

Build Docker image

  • docker build -t demo .

Run Docker image

  • docker run -d -p [http port]:[https port] [IMAGE_ID]

List images

  • docker image ls

List containers

  • docker container ls

About

This is a ASP.NET Core demo application with Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0