Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
Dockerize ASP.NET MVC from a github actions published app output from msbuild

I'm dockerizing legacy ASP.NET MVC 4.8, and I had this github actions that build the application.

jobs:
  build:
 
    runs-on: windows-latest
 
    steps:
    - uses: actions/checkout@v1
      name: Checkout Code
     
    - name: Setup MSBuild Path
      uses: warrenbuckley/Setup-MSBuild@v1
       
    - name: Setup NuGet
      uses: NuGet/setup-nuget@v1.0.2
     
    - name: Restore NuGet Packages
      run: nuget restore AspNetMVCApp.sln
 
    - name: Build and Publish Web App
      run: msbuild AspNetMVCApp.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
 
    - name: Upload Artifact
      uses: actions/upload-artifact@v1.0.0
      with:
        name: aspnet-mvc-app
        path: bin\Release\Publish

How do you get the published app and containerize it using something like the below

# FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
# WORKDIR /inetpub/wwwroot
# COPY /src/publish .

How do I use that published app and copy it to the /inetpub/wwwroot?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Add your Docker image definition to your GitHub repository under the name Dockerfile (no extension).

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
WORKDIR /inetpub/wwwroot
COPY /src/publish .

Then append your with GitHub Workflow definition with a docker/build-push-action@v2 action like below. It'll automatically pickup the Dockerfile and use that to build an image. By default it should have access to everything in your repository and all build artifacts.

      -
        name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          tags: user/app:latest
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!