ASP.NET Core on AWS Elastic Beanstalk Docker image through GitHub, CodeBuild, and CodePipeline CI/CD.

First steps

The ASP.NET Core web project

mkdir aspnetcore-api-aws
cd aspnetcore-api-aws
dotnet new web

The Buildspec file

version: 0.2phases:pre_build:commands:- dotnet restorebuild:commands:- dotnet publish -o output- mkdir build- cp -R output build/output- cp Dockerfile build/Dockerfileartifacts:files:- '**/*'base-directory: build

The Dockerfile

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1COPY output/* /app/EXPOSE 80ENTRYPOINT ASPNETCORE_URLS=http://*:80 dotnet /app/aspnetcore-api-aws.dll

At GitHub

The AWS services

The Elastic Beanstalk service

The CodePipeline service

Conclusion

--

--

--

Senior Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How To Scrape News Articles Using NLTK Python Package (EASY STEP-BY-STEP)

Beta Test Participation Guide

The difference between apt remove, purge, and autoremove

The Professionalism Snowball

Build Chatbots for SharePoint using Power Virtual Agents & SPFx

Creating A Reload Animation in Unity

Let’s make workflow engines fun again

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Filipe Macêdo

Filipe Macêdo

Senior Software Engineer

More from Medium

Docker Host Service Viewer Application

Invoke AWS Lambda Function programmatically using .NET, C# and AWS Lambda SDK

How to do .net core profiling in AWS ECS with Fargate?

Tutorial for Docker on Windows