Docker image version in Jenkins pipeline


We have docker images that are getting stored in ECR in aws. I want to run the Jenkins Pipeline Job to deploy the application with the current image version that it running with by passing it as a parameter and not to pick the latest. How we can write such Jenkins Pipeline.

You will need to give more details. Your question is very open ended with lots of possible answers. I can think of many ways to “deploy” a docker container.

  1. On baremetal (like ec2)
  2. Docker compose
  3. Kubernetes
  4. Deployment Service (like AWS BeanStalk)

So you will need to be more specific if you want to receive help.

Could you please explain further what “current image version that it running with” means?