<p>You need to develop some way of deploying your build into the Google Cloud VM.  Your solution will vary depending on how you are hosting the asp.net:</p>
<p>If you are running it as a container on the VM, then you'll need some way of stopping the container, pulling the new one from a registry that the VM has access to, and restarting it.  One way to achieve this would be to have your Azure DevOps pipeline execute a script local to the GCP VM that does these steps.</p>
<p>If you are using nginx or another webserver, you will need to copy the build artifacts to the new server.  You'll need to use a protocol such as <a href="https://www.pragmaticlinux.com/2020/07/how-to-copy-files-via-ssh/" rel="nofollow noreferrer">SSH</a> to establish a connection from your Azure DevOps instance to the GCP Linux VM.</p>

CC BY-SA 4.0
2022-12-20T09:16:31.893Z
Thanks for your answer, but my problem is what way is there to accomplish authomatically via an azure pipeline, what you noted in both scenarios.
Damien Doumer
CC BY-SA 4.0
2022-12-19T18:08:59.727Z
2022-12-19T18:08:59.727Z
Wesley Rolnick
<p>I'm using Google cloud, I have a linux VM up and ready for use, I have an ASP.net core web app on Azure devops. I have configured the build pipeline for this webapp, now I want to automate its deployment on my Linux server, but I don't know how to do that.</p>
<p>I have 2 options I tried:</p>
<ul>
<li>Building a docker container with my app and deploy on google container registry, but I couldn't find a way to later trigger the docker pull of my container on my linux VM to run it there, or run it with a docker compose.</li>
<li>Building a self contained package of the ASP.net core app, but I can't find a way of carrying the package and deploying it to my VM instance.</li>
</ul>
<p>There are several tutorials about deploying to Google app engine, GKE and Cloud Run. But I can't find one that shows how to do what I want with my linux VM.</p>
<p>Any help to overcome this?</p>

<docker><linux><google-compute-engine>
How to make a CI/CD of an ASP.net core app to Linux compute engine instance
Damien Doumer
# How to make a CI/CD of an ASP.net core app to Linux compute engine instance

(Asked by: username_0 on 2022-12-19)

I'm using Google cloud, I have a linux VM up and ready for use, I have an ASP.net core web app on Azure devops. I have configured the build pipeline for this webapp, now I want to automate its deployment on my Linux server, but I don't know how to do that.

I have 2 options I tried:

* Building a docker container with my app and deploy on google container registry, but I couldn't find a way to later trigger the docker pull of my container on my linux VM to run it there, or run it with a docker compose.
* Building a self contained package of the ASP.net core app, but I can't find a way of carrying the package and deploying it to my VM instance.

There are several tutorials about deploying to Google app engine, GKE and Cloud Run. But I can't find one that shows how to do what I want with my linux VM.

Any help to overcome this?

**Tags:** docker, linux, google-compute-engine


---

## 1 answers

### Answer by username_1 on 2022-12-19. Score: 0

You need to develop some way of deploying your build into the Google Cloud VM. Your solution will vary depending on how you are hosting the asp.net:

If you are running it as a container on the VM, then you'll need some way of stopping the container, pulling the new one from a registry that the VM has access to, and restarting it. One way to achieve this would be to have your Azure DevOps pipeline execute a script local to the GCP VM that does these steps.

If you are using nginx or another webserver, you will need to copy the build artifacts to the new server. You'll need to use a protocol such as [SSH](https://www.pragmaticlinux.com/2020/07/how-to-copy-files-via-ssh/) to establish a connection from your Azure DevOps instance to the GCP Linux VM.

> **Comments:**
> **username_0**: Thanks for your answer, but my problem is what way is there to accomplish authomatically via an azure pipeline, what you noted in both scenarios.  

---

