Docker java api maven构build错误:busybox是一个无法识别的图像。 请先拉下图片

我试图通过从git仓库克隆来构builddocker的Java API ,然后使用maven构build,如下所示:

mvn clean install -DskipTests=false -Ddocker.io.username=username -Ddocker.io.password=password -Ddocker.io.email=my@email.id 

但是,生成testing失败导致以下错误消息:

 Results : Failed tests: testRunShlex(com.github.dockerjava.client.DockerClientTest): busybox is an unrecognized image. Please pull the image first. testAuth(com.github.dockerjava.client.command.AuthCmdTest): com.sun.jersey.api.client.UniformInterfaceException: Client response status: 404 testAuthInvalid(com.github.dockerjava.client.command.AuthCmdTest): expected:<401> but was:<404> testAddAndCopySubstitution(com.github.dockerjava.client.command.BuildImageCmdTest): testDockerBuilderAddFileInSubfolder(com.github.dockerjava.client.command.BuildImageCmdTest): testDockerBuilderAddFolder(com.github.dockerjava.client.command.BuildImageCmdTest): testDockerBuilderAddUrl(com.github.dockerjava.client.command.BuildImageCmdTest): testNetCatDockerfileBuilder(com.github.dockerjava.client.command.BuildImageCmdTest): testNginxDockerfileBuilder(com.github.dockerjava.client.command.BuildImageCmdTest): commit(com.github.dockerjava.client.command.CommitCmdTest): busybox is an unrecognized image. Please pull the image first. testDiff(com.github.dockerjava.client.command.ContainerDiffCmdTest): busybox is an unrecognized image. Please pull the image first. copyFromContainer(com.github.dockerjava.client.command.CopyFileFromContainerCmdTest): busybox is an unrecognized image. Please pull the image first. createContainerWithEnv(com.github.dockerjava.client.command.CreateContainerCmdTest): busybox is an unrecognized image. Please pull the image first. createContainerWithHostname(com.github.dockerjava.client.command.CreateContainerCmdTest): busybox is an unrecognized image. Please pull the image first. createContainerWithVolume(com.github.dockerjava.client.command.CreateContainerCmdTest): busybox is an unrecognized image. Please pull the image first. info(com.github.dockerjava.client.command.InfoCmdTest): busybox is an unrecognized image. Please pull the image first. testKillContainer(com.github.dockerjava.client.command.KillContainerCmdTest): busybox is an unrecognized image. Please pull the image first. testListContainers(com.github.dockerjava.client.command.ListContainersCmdTest): Client response status: 404 listImages(com.github.dockerjava.client.command.ListImagesCmdTest) logContainer(com.github.dockerjava.client.command.LogContainerCmdTest): busybox is an unrecognized image. Please pull the image first. testPullImage(com.github.dockerjava.client.command.PullImageCmdTest): com.sun.jersey.api.client.UniformInterfaceException: Client response status: 404 testNotExistentImage(com.github.dockerjava.client.command.PushImageCmdTest): testPushLatest(com.github.dockerjava.client.command.PushImageCmdTest): busybox is an unrecognized image. Please pull the image first. removeContainer(com.github.dockerjava.client.command.RemoveContainerCmdTest): busybox is an unrecognized image. Please pull the image first. testRemoveImage(com.github.dockerjava.client.command.RemoveImageCmdTest): busybox is an unrecognized image. Please pull the image first. restartContainer(com.github.dockerjava.client.command.RestartContainerCmdTest): busybox is an unrecognized image. Please pull the image first. searchImages(com.github.dockerjava.client.command.SearchImagesCmdTest): com.sun.jersey.api.client.UniformInterfaceException: Client response status: 404 startContainer(com.github.dockerjava.client.command.StartContainerCmdTest): busybox is an unrecognized image. Please pull the image first. startContainerWithLinking(com.github.dockerjava.client.command.StartContainerCmdTest): busybox is an unrecognized image. Please pull the image first. startContainerWithPortBindings(com.github.dockerjava.client.command.StartContainerCmdTest): busybox is an unrecognized image. Please pull the image first. startContainerWithVolumes(com.github.dockerjava.client.command.StartContainerCmdTest): busybox is an unrecognized image. Please pull the image first. testStopContainer(com.github.dockerjava.client.command.StopContainerCmdTest): busybox is an unrecognized image. Please pull the image first. testTagImage(com.github.dockerjava.client.command.TagImageCmdTest): version(com.github.dockerjava.client.command.VersionCmdTest): com.sun.jersey.api.client.UniformInterfaceException: Client response status: 404 testWaitContainer(com.github.dockerjava.client.command.WaitContainerCmdTest): busybox is an unrecognized image. Please pull the image first. Tests run: 35, Failures: 35, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. 

在这里粘贴完整的输出。

我试图从docker集线器使用以下操作拉动busybox图像:

 sudo docker pull busybox 

并导致以下消息:

 Pulling repository busybox fd5373b3d938: Download complete d200959a3e91: Download complete 37fca75d01ff: Download complete a9eb17255234: Download complete 511136ea3c5a: Download complete 42eed7f1bf2a: Download complete 120e218dd395: Download complete f06b02872d52: Download complete c120b7cab0b0: Download complete 1f5049b3536e: Download complete 

我假设成功下载busybox图像。 但是,尝试重buildJava API会导致相同的错误消息。

我怎样才能解决这个问题,并成功地build立Java API?


系统规格:

主机:Ubuntu 14.04 Trusty Tahr LTS

sudo docker version的输出:

 Client version: 0.9.1 Go version (client): go1.2.1 Git commit (client): 3600720 Server version: 0.9.1 Git commit (server): 3600720 Go version (server): go1.2.1 Last stable version: 1.1.2, please update docker 

java API被configuration为使用Docker 1.1运行,尝试更新Docker。

Docker的Java API客户端

支持Docker客户端API v1.13,Docker Server版本1.1的一个子集

docker-java开发者论坛

检查官方网站上的说明: https : //docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit

确保你有openjdk进行开发。

 sudo apt-get install openjdk-7-jdk 

然后将你的JAVA_HOME环境variables指向/usr/lib/jvm/java-7-openjdk-amd64/

你正在使用不是为了这个目的而制造的JRE,而是似乎是越野车。