question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jig:dockerBuild fails on Windows

See original GitHub issue

Description of the issue: jig:dockerBuild fails on Windows with error: requested load from stdin, but stdin is empty: The pipe has been ended

Expected behavior: Run the image with local docker

Steps to reproduce: execute mvn compile jib:dockerBuild

Environment: Docker 18.06.1-ce, Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00) Java version: 10.0.2, vendor: Oracle Corporation, Default locale: en_US, platform encoding: UTF-8 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

jib-maven-plugin Configuration:

			<plugin>
				<groupId>com.google.cloud.tools</groupId>
				<artifactId>jib-maven-plugin</artifactId>
				<version>0.10.0</version>
				<configuration>
					<to>
						<auth>
							<password>local</password>
							<username>local</username>
						</auth>
						<image>kot.jresearch.org/gavka-api:${maven.build.timestamp}</image>
						<tags>
							<tag>latest</tag>
						</tags>
					</to>
					<container>
						<ports>
							<port>8080</port>
						</ports>
						<environment>
							<spring.profiles.active>nokafka</spring.profiles.active>
						</environment>
					</container>
				</configuration>
			</plugin>

Log output:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  36.941 s
[INFO] Finished at: 2018-11-19T07:47:48+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.10.0:dockerBuild (default-cli) on project org.jresearch.gavka.api.boot: 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]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.10.0:dockerBuild (default-cli) on project org.jresearch.gavka.api.boot: Build to Docker daemon failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Build to Docker daemon failed
    at com.google.cloud.tools.jib.maven.BuildDockerMojo.execute (BuildDockerMojo.java:124)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.io.IOException: 'docker load' command failed with error: requested load from stdin, but stdin is empty

    at com.google.cloud.tools.jib.docker.DockerClient.load (DockerClient.java:193)
    at com.google.cloud.tools.jib.builder.steps.LoadDockerStep.afterPushBaseImageLayerFuturesFuture (LoadDockerStep.java:106)
    at com.google.common.util.concurrent.CombinedFuture$CallableInterruptibleTask.runInterruptibly (CombinedFuture.java:181)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:57)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1135)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:844)
Caused by: java.io.IOException: The pipe has been ended
    at java.io.FileOutputStream.writeBytes (Native Method)
    at java.io.FileOutputStream.write (FileOutputStream.java:355)
    at java.io.BufferedOutputStream.flushBuffer (BufferedOutputStream.java:81)
    at java.io.BufferedOutputStream.write (BufferedOutputStream.java:127)
    at java.security.DigestOutputStream.write (DigestOutputStream.java:146)
    at com.google.cloud.tools.jib.hash.CountingDigestOutputStream.write (CountingDigestOutputStream.java:83)
    at org.apache.commons.compress.utils.CountingOutputStream.write (CountingOutputStream.java:48)
    at org.apache.commons.compress.utils.FixedLengthBlockOutputStream$BufferAtATimeOutputChannel.write (FixedLengthBlockOutputStream.java:244)
    at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.writeBlock (FixedLengthBlockOutputStream.java:92)
    at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.maybeFlush (FixedLengthBlockOutputStream.java:86)
    at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.write (FixedLengthBlockOutputStream.java:122)
    at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.write (TarArchiveOutputStream.java:454)
    at java.security.DigestOutputStream.write (DigestOutputStream.java:146)
    at com.google.cloud.tools.jib.hash.CountingDigestOutputStream.write (CountingDigestOutputStream.java:83)
    at com.google.common.io.ByteStreams.copy (ByteStreams.java:110)
    at com.google.cloud.tools.jib.blob.BlobDescriptor.fromPipe (BlobDescriptor.java:47)
    at com.google.cloud.tools.jib.blob.FileBlob.writeTo (FileBlob.java:38)
    at com.google.cloud.tools.jib.tar.TarStreamBuilder.writeEntriesAsTarArchive (TarStreamBuilder.java:51)
    at com.google.cloud.tools.jib.blob.WriterBlob.writeTo (WriterBlob.java:36)
    at com.google.cloud.tools.jib.docker.DockerClient.load (DockerClient.java:179)
    at com.google.cloud.tools.jib.builder.steps.LoadDockerStep.afterPushBaseImageLayerFuturesFuture (LoadDockerStep.java:106)
    at com.google.common.util.concurrent.CombinedFuture$CallableInterruptibleTask.runInterruptibly (CombinedFuture.java:181)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:57)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1135)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:844)

Additional Information:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
foalcommented, Nov 20, 2018

Pipe works, but anyway from yesterday I rebooted several times and update Docker to 2.0.0.0-win78 (28905). Now all works as desired.

1reaction
briandealwiscommented, Nov 20, 2018

I wonder if there’s a size limit that’s being hit.

Hmm, I was able to build examples/spring-boot-kubernetes with no issue, which is a hefty 60MB.

@foal if these problems persist, please try rebooting your machine. Windows can be a strange beast.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jib gradle plugin + static docker client: cannot build image due ...
Now it can load the base image and start building. Then, when I run jibDockerBuild --stacktrace , I see this error: Execution failed...
Read more >
google/jib - Gitter
Hello! I'm trying to execute ./gradlew build jibDockerBuild for a Spring Boot app written in Kotlin, targeting Java 11, via the Jib Gradle...
Read more >
[Solved]-Why jib dockerBuild plugin fails to connect-docker
Coding example for the question Why jib dockerBuild plugin fails to ... Why can't I connect to my local docker-compose container on Windows...
Read more >
Docker and Docker Compose - JHipster
Warning: If you are using Docker Machine on Mac or Windows, your Docker daemon has ... Error: EACCES: permission denied when installing JHipster...
Read more >
Docker build image failing with docker load command failed ...
Docker Desktop for Windows ... gradlew -Pprod bootWar jibDockerBuild ... Task :jibDockerBuild FAILED FAILURE: Build failed with an exception ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found