Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a docker image on Azure devops agent with docker task V2?

It's easy with docker task V1. It can run docker image from Azure Container Registry.

But with docker task V2, I can't find a way to run an image.

If I push the image with V2 and try to run it with V1, I can't set the 'latest' tag when I push with V2, but I need it when I run it with V1.

There must be a way to do it with docker task V2 I assume?

like image 636
Allen Zhang Avatar asked Oct 28 '25 10:10

Allen Zhang


1 Answers

For docker task v2, in fact, you can input the run command manually in that blank:

- task: Docker@2
  displayName: run
  inputs:
    containerRegistry: Merlindockerhub
    repository: 650301
    command: run
    arguments: '{image}'

For v2, we provide the support for inputting commands manually, no matter you configure it with UI or YAML. Both of them are all support.

enter image description here

like image 54
Mengdi Liang Avatar answered Oct 31 '25 01:10

Mengdi Liang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!