1

I am having self-hosted GitLab-EE. I want to enable CI / CD. I already have gitlab-runner on windows and it is activated for my project.
I also have custom server for hosting my ASP.NET Core 2.0 with Angular 5.0 application.

My final idea is when commit is made to GitLab, build and deploy (to custom server) is executed. Deploy path would be different if commit to master was made or any other branch (from merge request) conditional by Git Tag.

Almost all tutorials use docker, but I couldn't found why? What are the cons using docker?

I thought I only need msbuild (I can also install Visual Studio) on machine where GitLab-runner is running. It would build and deploy application. I found this configuration file which doesn't use docker, but question remains. Do I need docker and why?

Makla
  • 9,899
  • 16
  • 72
  • 142

1 Answers1

1

A docker image would contain all the msbuild dependencies and build tools needed to build your application with out you going through the trouble of manually installing them on your server.

So basically docker helps you to manage dependencies of you application more efficiently.

Margach Chris
  • 1,404
  • 12
  • 20
  • I am not building application on my server but on my self-hosted Git-Lab inside company. That means I am having access to local computer with Visual Studio installed. Is there no other reason? – Makla Feb 12 '18 at 13:31
  • Is this Self hosted Gitlab instance on your local computer also? , – Margach Chris Feb 13 '18 at 14:53
  • 1
    Now, if other people will be contributing to this application, meaning everyone's change has to be built/compiled by the CI/CD, including yours, you can setup a docker image with all the build tools and dependencies for the compiling stage. – Margach Chris Feb 14 '18 at 16:00
  • 1
    This also means you will not be compiling from with in visual studio but on the server (gitlab runner). – Margach Chris Feb 14 '18 at 16:01