Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

get docker image details like date

Mohan Kona October 26, 2024

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.

 

definitions:
  services:
    frontend:
       image:
          name: my-image:latest

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, atlassian community, job interviews, interview tips, career advice, interview preparation, job search, interview experiences, hiring process, atlassian careers, community discussion, interview best practices

Interview Tips & Pet Peeves ✍️

Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.

Share you experiences!
AUG Leaders

Atlassian Community Events