I have defined a docker image in the the definitions, and in later in the steps, i want to verify the image(if its the latest one) using the creation date of the image.
Hi Mohan,
You would need to pull the image during the step and then use the docker inspect command, something like the following:
pipelines:
default:
- step:
services:
- docker
- frontend
script:
- docker pull my-image:latest
- docker inspect my-image:latest | grep -i created
definitions:
services:
frontend:
image:
name: my-image:latest
Please keep in mind though that if a newer version of that image is pushed between the time that the service's image is pulled when the step starts and the time that you pull the image during the step's script, then you'll get the creation date for the newer image and not the one Pipelines used in this step.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.