Docker Container Best Practices: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(2 intermediate revisions by the same user not shown)
Line 36: Line 36:


{{Internal|Java in a Container|Java in a Container}}
{{Internal|Java in a Container|Java in a Container}}
=Fail Early=
Check the environment configuration and fail early in the ENTRYPOINT script:
<syntaxhighlight lang='bash'>
#
# check the environment and fail early, when the container executed for the first time
#
/opt/dsmanager/bin/dsmanager check-configuration || { echo "dsmanager configuration error" 1>&2; exit 1; }
</syntaxhighlight>
<tt>/opt/dsmanager/bin/dsmanager check-configuration</tt> must exit with a non-zero value if the configuration fails.

Revision as of 17:50, 16 February 2018

External

Internal

Overview

Reference

Document Images

Methods to Document Images
  • Logging
  • Metrics
  • Storage
  • Operations
  • Upgrades

Java in a Container

Java in a Container

Fail Early

Check the environment configuration and fail early in the ENTRYPOINT script:

 #
 # check the environment and fail early, when the container executed for the first time
 #
/opt/dsmanager/bin/dsmanager check-configuration || { echo "dsmanager configuration error" 1>&2; exit 1; }

/opt/dsmanager/bin/dsmanager check-configuration must exit with a non-zero value if the configuration fails.