private void addHealthCheck(StringBuilder b) {
        if (healthCheck != null) {
            StringBuilder healthString = new StringBuilder();

            switch (healthCheck.getMode()) {
            case cmd:
                buildOption(healthString, DockerFileOption.HEALTHCHECK_INTERVAL, healthCheck.getInterval());
                buildOption(healthString, DockerFileOption.HEALTHCHECK_TIMEOUT, healthCheck.getTimeout());
                buildOption(healthString, DockerFileOption.HEALTHCHECK_START_PERIOD, healthCheck.getStartPeriod());
                buildOption(healthString, DockerFileOption.HEALTHCHECK_RETRIES, healthCheck.getRetries());
                buildArguments(healthString, DockerFileKeyword.CMD, false, healthCheck.getCmd());
                break;
            case none:
                DockerFileKeyword.NONE.addTo(healthString, false);
                break;
            default:
                throw new IllegalArgumentException("Unsupported health check mode: " + healthCheck.getMode());
            }

            DockerFileKeyword.HEALTHCHECK.addTo(b, healthString.toString());
        }
    }
Create a Dockerfile following the format described in the
<a href="http://docs.docker.io/reference/builder/#usage">Docker reference manual</a>

@return the dockerfile create
@throws IllegalArgumentException if no src/dest entries have been added
src/main/java/io/fabric8/maven/docker/assembly/DockerFileBuilder.java