generators/docker-utils.js
function checkImageExist(opts = { cwd: './', appConfig: null }) {
    if (this.abort) return;

    let imagePath = '';
    this.warning = false;
    this.warningMessage = 'To generate the missing Docker image(s), please run:\n';
    if (opts.appConfig.buildTool === 'maven') {
        imagePath = this.destinationPath(`${opts.cwd + opts.cwd}/target/docker`);
        this.dockerBuildCommand = './mvnw -Pprod verify jib:dockerBuild';
    } else {
        imagePath = this.destinationPath(`${opts.cwd + opts.cwd}/build/docker`);
        this.dockerBuildCommand = './gradlew bootWar -Pprod jibDockerBuild';
    }

    if (shelljs.ls(imagePath).length === 0) {
        this.warning = true;
        this.warningMessage += `  ${chalk.cyan(this.dockerBuildCommand)} in ${this.destinationPath(this.directoryPath + opts.cwd)}\n`;
    }
}
function checkImageExist(opts = { cwd: './', appConfig: null }) {
    if (this.abort) return;

    let imagePath = '';
    this.warning = false;
    this.warningMessage = 'To generate the missing Docker image(s), please run:\n';
    if (opts.appConfig.buildTool === 'maven') {
        imagePath = this.destinationPath(`${opts.cwd + opts.cwd}/target/docker`);
        this.dockerBuildCommand = './mvnw -Pprod verify jib:dockerBuild';
    } else {
        imagePath = this.destinationPath(`${opts.cwd + opts.cwd}/build/docker`);
        this.dockerBuildCommand = './gradlew bootWar -Pprod jibDockerBuild';
    }

    if (shelljs.ls(imagePath).length === 0) {
        this.warning = true;
        this.warningMessage += `  ${chalk.cyan(this.dockerBuildCommand)} in ${this.destinationPath(this.directoryPath + opts.cwd)}\n`;
    }
}
function checkImageExist ( opts = { cwd : './' , appConfig : null } ) { if ( this . abort ) return ; let imagePath = '' ; this . warning = false ; this . warningMessage = 'To generate the missing Docker image(s), please run:\n' ; if ( opts . appConfig . buildTool === 'maven' ) { imagePath = this . destinationPath ( ` ${ opts . cwd + opts . cwd } ` ) ; this . dockerBuildCommand = './mvnw -Pprod verify jib:dockerBuild' ; } else { imagePath = this . destinationPath ( ` ${ opts . cwd + opts . cwd } ` ) ; this . dockerBuildCommand = './gradlew bootWar -Pprod jibDockerBuild' ; } if ( shelljs . ls ( imagePath ) . length === 0 ) { this . warning = true ; this . warningMessage += ` ${ chalk . cyan ( this . dockerBuildCommand ) } ${ this . destinationPath ( this . directoryPath + opts . cwd ) } \n ` ; } }
Check that a Docker image exists in a JHipster app.

@param opts Options to pass.
@property pwd JHipster app directory. default is './'
@property appConfig Configuration for the current application
Check that a Docker image exists in a JHipster app .