@Override
    public boolean validate(WorkflowContext context) throws HyscaleException {
        if (isDockerAvailable) {
            return isDockerAvailable;
        }
        if (isDockerUnavailable) {
            return false;
        }

        if (!ImageUtil.isImageBuildPushRequired(context.getServiceSpec())) {
            return true;
        }

        if (!hyscaleDockerClient.checkForDocker()) {
            logger.error("Docker not installed, validation failed");
            WorkflowLogger.persist(ImageBuilderActivity.DOCKER_NOT_INSTALLED, LoggerTags.ERROR);
            isDockerUnavailable = true;
            if(WorkflowLogger.isDisabled()){
                outputHandler.addErrorMessage(ImageBuilderErrorCodes.DOCKER_NOT_INSTALLED.getMessage());
            }
            return false;
        }

        if (!hyscaleDockerClient.isDockerRunning()) {
            logger.error("Docker not running, validation failed");
            WorkflowLogger.persist(ImageBuilderActivity.DOCKER_DAEMON_NOT_RUNNING, LoggerTags.ERROR);
            if(WorkflowLogger.isDisabled()){
                outputHandler.addErrorMessage(ImageBuilderErrorCodes.DOCKER_DAEMON_NOT_RUNNING.getMessage());
            }
            isDockerUnavailable = true;
            return false;
        }

        isDockerAvailable = true;
        return isDockerAvailable;
    }
1. It will check that spec has buildspec or dockerfile 
2. If both is not then it will return true
3. If any one is there then 
   3.1  It will verify that docker is installed or not
   3.2  It will run docker command 
   3.3  if command executed successfully then return true else false
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/DockerDaemonValidator.java