1
votes

I added a Docker task in the build pipeline to build and push the image I created to Docker Hub.

Then, I added two more tasks (copy files and publish build artifacts) so that the files are available to the release pipelines.

Now, I want to know how to run this image (docker run), so that the container gets deployed to my Ubuntu server instance (209.97.179.151).

What tasks should I add in the release pipeline to deploy the image to the server 209.97.179.151?

enter image description here

1
Hi @Vignesh Swaminathan Did you check out below solution of using ssh task? It seems working. You can accept it as answer if it works for you.Levi Lu-MSFT

1 Answers

2
votes

You can use the ssh task to ssh to the remote server (209.97.179.151).

Use docker stop, docker pull, and docker run to update your image.

You can set and use the $(tag) variable to set the tag of the image.

variables:
  tag: latest