HiveBrain v1.2.0
Get Started
← Back to all entries
debugdockerMinor

Docker calls to detect app crashing inside it

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
callscrashingappdockerdetectinside

Problem

Is there a way to know if an app has crashed inside docker using maybe bash script or API call from host container, am implementing CI/CD using Jenkins and will be deploying the built app via ssh to the main server and want to stop container when it crashes on auto-deploy.

Solution

Is there a way to know if an app has crashed inside docker

If your app is writing logs and is the main process in that container, then yes, just watch them


am implementing CI/CD and want to stop container when it crashes on auto-deploy

What's your tools used for CI/CD? For example, when you are releasing an app with kubectl apply you can wait till automated deployment succeed: kubectl rollout status

Context

StackExchange DevOps Q#11780, answer score: 2

Revisions (0)

No revisions yet.