我试图通过从git存储库克隆用于码头的Java,然后使用maven构建,如下所示:
mvn clean install -DskipTests=false -Ddocker.io.username=username -Ddocker.io.password=password -Ddocker.io.email=my@email.id但是,生成测试失败,导致以下错误消息:
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.粘贴完整的输出这里。
我尝试使用以下方法从码头集线器中提取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映像。但是,试图重新构建Java会产生相同的错误消息。
如何解决这个问题并成功构建Java?
系统规范:
主机:Ubuntu14.04可信的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发布于 2014-08-19 13:34:20
java配置为使用Docker1.1运行,请尝试更新Docker。
Java客户端用于Docker 支持Docker客户端API v1.13的子集,DockerServerVersion1.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环境变量更改为指向/usr/lib/jvm/java-7-openjdk-amd64/
您正在使用的JRE,这不是为了这个目的,似乎是错误的。
https://stackoverflow.com/questions/25384618
复制相似问题