generator-jhipster: 'mvnw package -Pprod jib:dockerBuild' fails to build an image
Overview of the issue
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild (default-cli) on project servone: Build to Docker daemon failed: ‘docker load’ command failed with error: requested load from stdin, but stdin is empty: The pipe has been ended -> [Help 1]
Motivation for or Use Case
Explained step to build a docker image actually fails.
Reproduce the error
Create microservice Create gateway Create docker folder and run ‘jhipster docker-compose’ As instructed run ‘mvnw package -Pprod jib:dockerBuild’
Related issues
Suggest a Fix
JHipster Version(s)
v5.5.0
JHipster configuration
λ jhipster info Using JHipster version installed locally in current project’s node_modules Executing jhipster:info Options: from-cli: true Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
servone@0.0.0 C:\dev\bitbucket\jhipster-retest\servone
`-- generator-jhipster@5.5.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.servone"
},
"jhipsterVersion": "5.5.0",
"applicationType": "microservice",
"baseName": "servone",
"packageName": "com.servone",
"packageFolder": "com/servone",
"serverPort": "8081",
"authenticationType": "jwt",
"cacheProvider": "hazelcast",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "mongodb",
"devDatabaseType": "mongodb",
"prodDatabaseType": "mongodb",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
"enableTranslation": false,
"testFrameworks": [],
"jhiPrefix": "jhi",
"clientPackageManager": "npm",
"skipClient": true,
"skipUserManagement": true
}
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
Environment and Tools
java version “1.8.0_191” Java™ SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot™ 64-Bit Server VM (build 25.191-b12, mixed mode)
git version 2.9.0.windows.1
node: v8.12.0
npm: 6.4.1
yeoman: 2.0.5
yarn: 1.10.1
Docker version 18.03.0-ce, build 0520e24302
docker-compose version 1.20.1, build 5d8c71b2
Congratulations, JHipster execution is complete!
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
- Checking this box is mandatory (this is just to show you read everything)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 36 (15 by maintainers)
Can you try:
mvnw clean package -Pprod jib:exportDockerContextThendocker build -t myimage target/jib-docker-context@PierreBesson Followed your commands and could build images.
what worked for me: baeldung jib link macos docker-credential-helpers
I faced the exact same issue, it never happened with older jhipster before.
I’m doing these everyday on linux(preparing demo for Devoxx) and so far no problems and most people on core team are doing this on macs as well. So I don’t know what we can do here, it definitely sounds like an issue with your environment. I’m closing this as not reproduceable. If you manage to gather more info and can prove that it indeed is a JHipster related bug then please let us know and we will reopen this. I’m so sorry we couldn’t be of any more help. Hope you understand
probably because your Docker machine doesn’t have enough memory.
The more I read this ticket, the more I think all problems comes from your environment, as no one manage to reproduce the issue
Sorry, reading your comments I’m reopening the ticket, of course.