Reader small image

You're reading from  Docker and Kubernetes for Java Developers

Product typeBook
Published inAug 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781786468390
Edition1st Edition
Languages
Right arrow
Author (1)
Jarosław Krochmalski
Jarosław Krochmalski
author image
Jarosław Krochmalski

Jaroslaw Krochmalski is a passionate software designer and developer who specializes in the financial business domain. He has over 12 years of experience in software development. He is a clean-code and software craftsmanship enthusiast. He is a Certified Scrum Master and a fan of Agile. His professional interests include new technologies in web application development, design patterns, enterprise architecture, and integration patterns. He has been designing and developing software professionally since 2000 and has been using Java as his primary programming language since 2002. In the past, he worked for companies such as Kredyt Bank (KBC) and Bank BPS on many large-scale projects such as international money orders, express payments and collection systems. He currently works as a consultant in Danish company 7N as an IT architect for the Nykredit bank. You can reach him via Twitter at @jkroch or by e-mail at jarek@finsys.pl. I would like to say hello to my friends at 7N and Nykredit, keep up the great job!
Read more about Jarosław Krochmalski

Right arrow

Restart policies

By using the --restart option with the docker run command you can specify a restart policy. This tells Docker how to react when a container shuts down. The container then can be restarted to minimize downtime, for example if running on a production server. However, before we explain the Docker restart policy, let's focus for a while on exit codes. The exit code is crucial information, it tells why the container failed to run or why it exited. Sometimes it's related to the contained command you will give to the docker run as a parameter. When the docker run command ends with a non-zero code, the exit codes follow the chroot standard, as you can see here:

  • exit code 125: The docker run command fails by itself
  • exit code126: The supplied command cannot be invoked
  • exit code 127: The supplied command cannot be found
  • Other, non-zero, application dependent exit...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Docker and Kubernetes for Java Developers
Published in: Aug 2017Publisher: PacktISBN-13: 9781786468390

Author (1)

author image
Jarosław Krochmalski

Jaroslaw Krochmalski is a passionate software designer and developer who specializes in the financial business domain. He has over 12 years of experience in software development. He is a clean-code and software craftsmanship enthusiast. He is a Certified Scrum Master and a fan of Agile. His professional interests include new technologies in web application development, design patterns, enterprise architecture, and integration patterns. He has been designing and developing software professionally since 2000 and has been using Java as his primary programming language since 2002. In the past, he worked for companies such as Kredyt Bank (KBC) and Bank BPS on many large-scale projects such as international money orders, express payments and collection systems. He currently works as a consultant in Danish company 7N as an IT architect for the Nykredit bank. You can reach him via Twitter at @jkroch or by e-mail at jarek@finsys.pl. I would like to say hello to my friends at 7N and Nykredit, keep up the great job!
Read more about Jarosław Krochmalski