Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
466 views

I'm trying to use the Docker-Java API. Following the instruction in https://github.com/docker-java/docker-java/blob/main/docs/getting_started.md I build a DockerClientConfig and try to build a ...
Chengyuan Zhang's user avatar
0 votes
1 answer
138 views

I'm trying to create a local Docker registry using Testcontainers and push an image programatically to it. However, I'm getting a connection refused error when attempting to push the image. The first ...
twerpiebird's user avatar
0 votes
1 answer
343 views

Initial Error: Encountered a NoClassDefFoundError when building with Docker Java API on a spring boot "3.2.1" Kotlin 1.9.21 project java.lang.NoClassDefFoundError: javax/ws/rs/core/...
freak0's user avatar
  • 93
1 vote
1 answer
391 views

I am trying to run an exec command on an already running docker container on a remote host using java. I am successfully able to run the exec command from the CLI of the host machine using docker exec ...
de5tro's user avatar
  • 29
1 vote
1 answer
2k views

I am trying to create a Docker client with the Docker Java API, but I get a ClassNotFoundException when running my code. I am following this Baeldung guide, but I am using the latest version of docker-...
Anzu67's user avatar
  • 33
1 vote
1 answer
3k views

I am using azul/zulu-openjdk-distroless:17.0.6 image and want to execute the java command with parameters but it fails at the runtime Here is my docker image: FROM alpine:3.17.3 as build-env ARG ...
Sunflame's user avatar
  • 3,196
3 votes
2 answers
5k views

I have this very simple code for running my integration test: (using Testcontainer artifact version 1.16.2) Note: I have tested whether this port in test is available before running the test case. @...
tepetrol's user avatar
  • 114
0 votes
1 answer
655 views

i'm using the java-docker client from here: https://github.com/docker-java/docker-java. I trying to figure out how to set the stop timeout for the docker stop command. So i'm using in java the method ...
codenewbie's user avatar
18 votes
3 answers
24k views

I'm using testcontainer version 1.15.2. Tests are run in intellij on windows 10. I have a wiremock container. By default it listens on the port 8080. I would like to map this port to let's say 8081. ...
Filip Kowalski's user avatar
1 vote
1 answer
871 views

I am trying to load image to docker from tar file and verify if the tar file is valid or not. Now if tar file is valid I need to get the imageName and tag. But I checked and the return type for exec ...
Vipin Gupta's user avatar
-1 votes
1 answer
1k views

When I try to run the java swing image getting the "Headless Exception error" DockerFile: FROM openjdk:8 COPY requiredlibararies requiredlibraries COPY myjar.jar myjar.jar CMD ["java&...
Hari Raj's user avatar
3 votes
1 answer
12k views

Context I have a webservice writing a test id in a queue. Then, a listener reads the queue, searches the test and starts it. During those steps, it writes updates of the test in the database in order ...
Chavjoh's user avatar
  • 496
0 votes
2 answers
740 views

We wanted to list images and tags which names start with certain string. So far, we explored a few java lib (docker-java and spotify ones) and did quite amount of research, but still couldn't find a ...
foxwendy's user avatar
  • 2,929
5 votes
1 answer
374 views

I am trying to pull an alpine image using docker-java library. Image got pulled successfully but I am not seeing any docker output on console. How to enable logging in docker-java library. public ...
subham's user avatar
  • 117
-1 votes
2 answers
3k views

I am using windows 10 enterprise version and i have tested docker hello world web app it works just fine. Dockerfile FROM adoptopenjdk/openjdk11:latest WORKDIR /app COPY ./ ./ EXPOSE 3000 CMD ["...
user10916892's user avatar
  • 1,007
2 votes
0 answers
488 views

I'm using the docker-java library in a command-line project, doing things like this: private DockerClient client; public Docker() { var config = DefaultDockerClientConfig ...
Ryan Lundy's user avatar
  • 211k
1 vote
1 answer
1k views

I am using docker-java to spawn new containers. I want to remove the containers after they are finished. Is there a way to achieve this with docker-java? So I basically want something like docker ...
eugenkaltenegger's user avatar
0 votes
1 answer
782 views

I am using the docker-java Maven library, and I would like to know if there is a way to check if an image has already been pulled or is present locally before pulling it if necessary, with only the ...
Ordinaly's user avatar
0 votes
2 answers
454 views

Using https://github.com/docker-java/docker-java and looking for a way to add the --with-registry-auth option from https://docs.docker.com/v17.12/engine/reference/commandline/service_create/#options ...
TomGrill Games's user avatar
2 votes
2 answers
9k views

Is there a command that I can evaluate (eval $COMMAND) or an environment variable that I can inspect to get the URI of the locally running docker host? I need to be this an expression to evaluate at ...
Marco R.'s user avatar
  • 2,710
0 votes
1 answer
134 views

I'm trying to achieve something similar to this: -p 192.168.1.100:8080:80 with docker-java. The only example that I found for publishing/mapping ports with docker-java is using the .withExposedPorts ...
nikitz's user avatar
  • 1,091
5 votes
0 answers
635 views

There is a method: org.testcontainers.containers.GenericContainer#withNetwork which I can use to spawn containers with a same network using TestContainers lib. But what about DockerComposeContainer,...
Nikolay Kuznetsov's user avatar
0 votes
2 answers
3k views

I need to disable IPv6 when starting a Docker container from Java code. Using the command line, it is as follows: docker run --sysctl net.ipv6.conf.all.disable_ipv6=1 ... Is it possible to do the ...
Boni García's user avatar
  • 4,878
85 votes
3 answers
196k views

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 ...
user3356164's user avatar
0 votes
1 answer
92 views

I'm using the docker-java libraries to handle start up of a Docker image: DockerClient dockerClient = DockerClientBuilder.getInstance("unix:///var/run/docker.sock").build(); CreateContainerResponse ...
Francesco Marchioni's user avatar