You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
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.
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.