docker-java

Control docker-compose in Java

女生的网名这么多〃 提交于 2020-03-01 04:38:07
问题 I created a fairly amount of docker-compose scripts which spawn up several services. I now want to control docker-compose in the JVM. Basically, I want to be able to execute up and down , ideally with -p <project name> parameter, so I can spawn multiple instances at the same time. Is this possible in Java? 回答1: There might be two possible approaches that you can take: Run docker-compose up/down using normal command executor (e.g. with the help of ProcessBuilder and run OS command) Using

Pulling image from Amazon ECR using docker-java

我与影子孤独终老i 提交于 2020-01-24 09:50:27
问题 I am facing an issue with pulling image from Amazon ECR using docker-java client. The authentication of ECR registry login is successful, but unable to pull a specific image from the repository. Strange thing is that logging into ECR using bash and pulling image using docker works. I am using 3.0 version of java-docker library (https://github.com/docker-java/docker-java/). Any help on how to debug or solve this issue will be useful. // ECR client AmazonECRClient ecrClient = new

How to make curl available in Docker image based java:8-jdk-alpine and keep the image clean?

柔情痞子 提交于 2019-12-22 01:24:47
问题 We are having java code that runs curl command to fetch the some result. We have built a jar file and the jar file executes fine Now, when we try to dokerize the java program (using jar) and run the application in docker we get this error: errorjava.io.IOException: Cannot run program "curl": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.ps.api.common.CoreAPI_Spec.executeCoreAPI(CoreAPI_Spec.java:295) at com.ps.api.common.CoreAPI_Spec

How to make curl available in Docker image based java:8-jdk-alpine and keep the image clean?

风格不统一 提交于 2019-12-04 23:59:49
We are having java code that runs curl command to fetch the some result. We have built a jar file and the jar file executes fine Now, when we try to dokerize the java program (using jar) and run the application in docker we get this error: errorjava.io.IOException: Cannot run program "curl": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.ps.api.common.CoreAPI_Spec.executeCoreAPI(CoreAPI_Spec.java:295) at com.ps.api.common.CoreAPI_Spec.getAccessTokens(CoreAPI_Spec.java:319) Dockerfile used : FROM ubuntu:16.04 MAINTAINER niro; # Install