- Published on
Docker and CI/CD
Series: .NET Microservice with ABP
This post is part of the .NET Microservice with ABP series.
Table of Contents
This is the part 10 of the series: .NET Microservice with ABP
Posts in the Series
Part 3. Administration Service
Part 8. Identity server and Angular App
Part 10. Docker and CI/CD (this post)
Intro
In this post we will see how to add docker support to all the services and setup a CI/CD pipeline with github actions.
Docker support
Docker support can be added easily by using visual studio. since all the project is available in the solution vs will create a Docker file and add it to the project. In this we will use the Identity server it will be similar for all the other services.
To add Docker support right click on the Identity server project and choose add.

In the add menu choose docker support

In the docker file option choose linux

The final docker file will look like this. Here is the location of this sample file https://github.com/antosubash/AbpMicroservice/blob/main/apps/Tasky.IdentityServer/Dockerfile

We have to do this to all the services.
CI/CD
Here is the sample github action file.
name: Docker Image CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Gateway Docker image
run: docker build . --file gateway/Tasky.Gateway/Dockerfile --tag gateway:dev
- name: Build the IdentityServer Docker image
run: docker build . --file apps/Tasky.IdentityServer/Dockerfile --tag identityserver:dev
- name: Build the Administration Docker image
run: docker build . --file services/administration/host/Tasky.AdministrationService.HttpApi.Host/Dockerfile --tag administration:dev
- name: Build the IdentityService Docker image
run: docker build . --file services/identity/host/Tasky.IdentityService.HttpApi.Host/Dockerfile --tag identityservice:dev
- name: Build the SaaS Docker image
run: docker build . --file services/saas/host/Tasky.SaaSService.HttpApi.Host/Dockerfile --tag saas:dev
Related Posts
Continue reading with these related articles
Migrating Tye to Aspire
In this post we will see how to migrate the Tye to Aspire
.Net Microservice template with ABP
In this post I will show you how to create ABP microservice using a dotnet new template.
Migrating Identity Service to OpenIddict Module
In this post we will see how to replace Identity server with OpenIddict in our microservice