Tag: spotify

不能从Spotify的docker maven插件从pvtregistry中提取图像

我在Windows Server 2016上使用Docker。在我的组织的私人registry中,我手动推送了一个Docker镜像。 在我的maven项目中,我用户spotify的docker-maven-plugin来拉取这个图像并在其上构build。 我的POM: <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.13</version> <executions> <execution> <phase>package</phase> <goals> <goal>build</goal> </goals> </execution> </executions> <configuration> <serverId>docker-hub</serverId> <registryUrl>https:///abc-docker.xyz.abc.com/v2/</registryUrl> <imageName>my-app</imageName> <imageTags> <imageTag>${project.version}</imageTag> <imageTag>abc-docker.xyz.abc.com/my-app</imageTag> </imageTags> <dockerDirectory>src/skeleton/docker-linux/my-app/</dockerDirectory> <resources> <resource> <targetPath>/</targetPath> <directory>${dockerlinux.stage.my-app</directory> </resource> </resources> </configuration> </plugin> 我encryption的主密码,并将其放置在我的.m2下的settings-security.xml中,并使用-ep选项将密码encryption到registry中,并将其放在settings.xml中的服务器部分: 设置-security.xml文件: <?xml version="1.0" encoding="UTF-8"?> <settingsSecurity> <master>"output of -emp <a random master password>"</master> </settingsSecurity> settings.xml中: <server> <id>docker-hub</id> <username>myusername</username> <password>"output of mvn […]

如果我正在更新,我应该重新启动泊坞窗容器吗?

我正在使用Spotify Docker客户端(8.7.1版本)来pipe理docker集装箱。 似乎如果试图通过调用updateContiner方法udpate hostconfig没有任何工作..所有这一切,我在做容器启动。 更新后应该重新启动容器吗? ContainerInfo ci = containerManager.createContainer(godzillaName, imagePath, new String[] {DEFAULT_API_PORT}, defaultNetwork.id(), networks); containerManager.startContainer(ci.id()); ContainerInfo info = containerManager.inspectContainer(ci.id()); HostConfig.RestartPolicy restartPolicy = new HostConfig.RestartPolicy() { @Override public String name() { return "no"; } @Override public Integer maxRetryCount() { return 0; } }; String ipAddress = info.networkSettings().networks().get(defaultNetwork.name()).ipAddress(); final HostConfig hostConfig = HostConfig.builder() .restartPolicy(restartPolicy) .dns(containerName) .devices(new […]

如何从一个Javadocker容器应用程序parsing文件

我有一个Java应用程序需要parsing一个数据集文件。 我使用Docker容器化了应用程序,但容器没有在我的主机中看到我的文件。 所以,我需要以某种方式将其包含在docker容器中,或通过映射到我的容器中的docker容器使其可用。 在我的Java应用程序内 String dataSet = "/usr/DataSet/TempData.txt"; // inside the container File textfile = new File(dataSet); Scanner sc = new Scanner(textfile); 和我的文件存储在我的主机目录(/ home / myusername /桌面/数据集)。 我使用maven中的spotify插件编译并构build了我的docker镜像。 生成映像后,我运行一个容器并映射包含我的TempData.txt的卷: sudo docker run -it -v /home/myUserName/Desktop/DataSet:/usr/DataSet –name myapp myImageName bash 但是我得到java.io.FileNotFoundException错误,因为该文件在我的容器中不可用。 什么是使我的Javadocker应用程序可以读取和parsing它的文件的最佳方式是什么? 感谢您的投入!

如何使dockercli使用dockerhub v2registryurl

当我尝试推像一样的图像 docker工推动jikuma / dockercomposetest 它被parsing为 docker.io/jikuma/dockercomposetest知识库url。 我想要使​​用v2 docker hubregistryurl。 我怎样才能做到这一点。 什么应该是我的registryurl。 以及如何使它默认的docker客户端。 这里是docer版本的输出。 客户端:版本:17.06.0-ce API版本:1.30 Go版本:go1.8.3 Git commit:02c1d87内置:星期五23 23 21:30:30操作系统/ Arch:windows / amd64 服务器: 版本:17.06.0-ce API版本:1.30(最低版本1.12) Go版本:go1.8.3 Git commit:02c1d87 build于:周五6月23日21:51:55 2017 OS / Arch:linux / amd64 实验:是的

不能使用Spotify插件来构buildDocker镜像

我一直在使用Spotify插件来构buildDocker镜像,但由于某种原因,它突然停止工作,并且发出错误,抱怨Spotify插件上的exec失败 [INFO] [INFO] — maven-jar-plugin:2.5:jar (default-jar) @ SimpleWebApp — [INFO] Building jar: /home/test/opd_workspace/my_simple_webapp/target/SimpleWebApp-0.0.1-SNAPSHOT.jar [INFO] [INFO] — spring-boot-maven-plugin:1.3.5.RELEASE:repackage (default) @ SimpleWebApp — [INFO] [INFO] — docker-maven-plugin:0.2.3:build (default-cli) @ SimpleWebApp — SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [INFO] Copying /home/test/opd_workspace/my_simple_webapp/target/SimpleWebApp-0.0.1-SNAPSHOT.jar -> /home/test/opd_workspace/my_simple_webapp/target/docker/SimpleWebApp-0.0.1-SNAPSHOT.jar [INFO] Copying […]

卡夫卡docker工人 – 不能从docker集装箱外生产或消费

卡夫卡在docker集装箱工作正常。 我可以使用docker exec -it [container name] [kafkascript]并成功创build主题,生成/使用消息,但是当我使用本地kafka脚本从Docker容器之外进行尝试时,我只能创build和列出主题。 生成和使用消息会引发错误: 制作 : ~/development/lib/kafka/kafka_2.11-0.10.0.0$ bin/kafka-console-producer.sh –broker-list $(docker-machine ip kafka):9092 –topic test asdf [2016-09-18 10:13:48,999] ERROR Error when sending message to topic test with key: null, value: 4 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Batch containing 1 record(s) expired due to timeout while requesting metadata from brokers for test-0 消费: […]

com.spotify.docker.client.DockerRequestException:请求错误:DELETE unix:// localhost:80 / v1.12 / containers / …:409

我正在开发一个Java应用程序,它使用Google Kubernetes在Apache Tomcat Docker Containers中部署Web工件。 我使用https://github.com/spotify/docker-client来执行Docker镜像和容器处理活动,并使用https://github.com/fabric8io/fabric8/tree/master/components/kubernetes-api Kubernetes相关的function。 在这个应用程序中,我添加了一个function,使用户能够移除用户部署的Web工件。 删除I时, 删除我用来生成所需数量的Pod复制副本的Kubernetes复制控制器 分别删除副本窗格(因为在Java API的相应方法中删除复制控制器时,不会自动删除窗格) 删除掉相应的服务创build 删除对应于已删除的窗格的Docker容器 最后,删除用于部署的Docker镜像 以下代码显示了已执行的删除function: public boolean remove(String tenant, String appName) throws WebArtifactHandlerException { String componentName = generateKubernetesComponentName(tenant, appName); final int singleImageIndex = 0; try { if (replicationControllerHandler.getReplicationController(componentName) != null) { String dockerImage = replicationControllerHandler.getReplicationController(componentName).getSpec() .getTemplate().getSpec().getContainers().get(singleImageIndex).getImage(); List<String> containerIds = containerHandler.getRunningContainerIdsByImage(dockerImage); replicationControllerHandler.deleteReplicationController(componentName); podHandler.deleteReplicaPods(tenant, appName); serviceHandler.deleteService(componentName); […]

Docker maven插件ClientProtocolException(使用Docker Toolbox的Windows 10)

我正在尝试使用docker-maven-plugin(由spotify提供: https : //github.com/spotify/docker-maven-plugin )构build一个docker镜像,但事情并没有真正解决。 起初我得到这个例外: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 我发现我必须创build一个env。 variables来解决这个问题( https://github.com/spotify/docker-maven-plugin/issues/135 ): set DOCKER_HOST=set DOCKER_HOST=tcp://192.168.99.100:2376 所以在设置env后。 variables我不断收到这个ClientProtocolException: [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.3.258:build (default-cli) on project docker_micro_maven: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException: The server failed to respond with a valid HTTP response 我不知道如何解决这个问题,任何input将不胜感激。

Spotify docker-maven-plugin未经授权:需要身份validation公开回购

我在使用下面的命令将docker映像推送到集线器时遇到问题: mvn clean package docker:build -DpushImage 每次我得到以下回应: [WARNING] Failed to push jdruwe/k8s-product-owner, retrying in 10 seconds (5/5). … [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project k8s-product-owner: Exception caught: unauthorized: authentication required -> [Help 1] 当我尝试使用以下命令之一login时,我不断收到login成功的错误 docker login -u jdruwe https://index.docker.io/v1/ OR docker login 我确实在集线器上创build了一个空的回购,试图解决它: 有任何想法吗?

Docker Maven Spotify插件 – 可能切换到非安全registry

我正在使用Spotify Maven插件在执行某些Maven目标时自动化构build和部署Docker镜像。 但是,我正在运行可通过以下主机访问的私有不安全registry:server.mydomain.com:5000。 但是,我似乎无法停止插件强制安全推送到存储库? 它使用https://server.mydomain.com:5000 。 有什么办法强制插件不使用HTTPS? 谢谢。 编辑: 当前插件POMconfiguration: <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.3</version> <configuration> <imageName>server.mydomain.com:5000/${project.artifactId}</imageName> <baseImage>java</baseImage> <entryPoint>["java", "-jar", "/${project.build.finalName}-packaged.jar"]</entryPoint> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}-packaged.jar</include> </resource> </resources> <imageTags> <imageTag>${project.version}</imageTag> <imageTag>latest</imageTag> </imageTags> <retryPushCount>0</retryPushCount> </configuration> <executions> <execution> <id>build-image</id> <phase>package</phase> <goals> <goal>build</goal> </goals> </execution> <execution> <id>push-image</id> <phase>deploy</phase> <goals> <goal>push</goal> </goals> </execution> </executions> </plugin>