Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Pipelines - Move to next step after successfully running a container.



I am building a pipeline to build and distribute a dockerised application. I am able to get the container built and running but because it's essentially an open-ended container that runs and runs I need to ensure it is running and then stop the container and move to the next steps in the pipeline.

Is there any way to do this? The reason I want to ensure that it runs is I have experienced issues in the past where dependencies in parts of the Dockerfile stages were updated and caused the container to build but not run.

Currently, I have tried curl'ing the localhost but that doesn't get triggered. the container runs and as it's long-standing it therefore just stays on that command indefinitely.

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 23, 2023

Hey @obsydian 

It's possible and mainly depends on your definition of "successful run" of your image. Does "successful" mean that the container run for X seconds? or reached a certain point in the code? something else?  

Basically, you would need to:

  1. Run your container in the background, using "-d" flag.
  2. Run "sleep" in your step to let your container reach the desired point.
  3. Check if the container reached the desired point. Depending on your need, it might be checking if the container is still running, checking the container's logs, etc'.
  4. Exit the step with a suitable exit code

Hope that helps   

By runs I just need to check it doesn't error on running. I just need to check that the server is up and running and that could be done by checking the container log which shows the following.

[info] The server listening at port: 4000

 Or by pinging the healthcheck endpoint. I'm not sure which is preferable or how I go about doing this as the next step in the pipeline. Any comments or leads welcome but thanks for your input already.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events