Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
496 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
410 views

I’m trying to connect my Spring Boot application to the Docker daemon using the docker-java library, but I’m encountering the following error: java.lang.RuntimeException: org.apache.hc.client5.http....
Deshy Dan's user avatar
0 votes
1 answer
151 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
338 views

Environment: Fedora 39 openjdk-17 docker 25.01 My purpose is to run ffmpeg to merge Multiple video files into a single file, and i choose to use docker(manage by com.github.docker-java:docker-java:3.3....
babu babu's user avatar
0 votes
1 answer
346 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
0 votes
0 answers
165 views

I have a docker-swarm stack with a number of services, one of which is a java application container that needs to launch a command in the shell of another container. The two services are deployed on ...
Luigi's user avatar
  • 411
1 vote
1 answer
395 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
208 views

When running an ocrmypdf docker container, all I get is the following message: ocrmypdf: error: unrecognized arguments: 64ee37a6fc66cf591ce4a35f-1.png_OCR.pdf This is what my docker inspect container ...
Luis Lavieri's user avatar
  • 4,139
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
0 votes
1 answer
231 views

Can the Docker Java client library (https://github.com/docker-java/docker-java) be used to execute custom commands? I want to use the library to check if Docker images I need to download are ...
Just a fellow coder's user avatar
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,206
3 votes
1 answer
2k views

I have an existing PostGres docker container running in the background. Is it possible to create a GenericContainer that will parse the existing PostGres container by taking in the container ID, ...
Ajay's user avatar
  • 31
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
378 views

I'm trying to run this command in docker trough java, but i don't know why it only works when i execute the command in the host machine and not trough java (when execute on java it doesn't add or say ...
R3bck's user avatar
  • 53
0 votes
1 answer
670 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
0 votes
0 answers
1k views

Here is my Dockerfile FROM ubuntu:20.04 # Install java 8 with apt-get RUN apt-get update -qq && apt-get install -yqq openjdk-8-jdk # Install java 11 with sdkman RUN apt-get install -yqq curl ...
Zarki's user avatar
  • 1
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
1k views

I'm trying to upgrade from docker-java 0.10.3 to 3.2.7. This line has me completely stumped: InputStream response = dockerClient.attachContainerCmd(container.getId()) .withLogs(true) ....
Matthew's user avatar
  • 14.1k
1 vote
1 answer
874 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
0 votes
1 answer
369 views

I want to ask how I use the withCmd method as follows: commands = new String[]{"echo","test:111 | chpasswd"}; ExecCreateCmdResponse execCreateCmdResponse = dockerClient....
yang's user avatar
  • 1
-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
2 votes
1 answer
1k views

I would like to run some integrational tests which would include setting up a complete environment with org.testcontainers Docker Compose Module. I am new to Windows and Docker testing, same with the ...
Five's user avatar
  • 398
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
1 answer
1k views

I can create, start and retrieve an instance of a docker container like this: CreateContainerResponse response = dockerClient.createContainerCmd(imageId).exec(); String containerId = response.getId(); ...
Rupert Madden-Abbott's user avatar
0 votes
2 answers
751 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
1 vote
0 answers
354 views

I am trying to run a docker image using the following code. But the container is exiting immediately after starting. I don't find -d params at creating container. how to do? HostConfig hostConfig = ...
xue xue's user avatar
  • 11
5 votes
1 answer
377 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 vote
1 answer
665 views

I use Java to build a Docker image. The Dockerfile and code are ready. I can build an image successfully through CLI, such as: docker build -t imgetest:1.0 . My Dockerfile is: FROM node:6.14.2 ...
taichi_tiger's user avatar
  • 1,111
-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
0 votes
2 answers
1k views

This is the start.sh script i am using: #!/bin/bash touch app.log HEAP_SIZE="-Xms1G -Xmx2G" GC_ARGS="-XX:+UseG1GC -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError" ARGS="$HEAP_SIZE $...
user10916892's user avatar
  • 1,007
2 votes
0 answers
489 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 votes
1 answer
193 views

I am creating docker containers inside my java application (using docker-java). I want to make the containers (all from the same image) accessible for the host. Preferably all the containers listen ...
eugenkaltenegger's user avatar
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
2 votes
2 answers
4k views

I want to run the following command from within a Java Eclipse Project: docker container run -p 4000:5000 virtuprint:vp where virtuprint:vp is an image. I installed the docker-java api from here ...
Flontis's user avatar
  • 357
0 votes
1 answer
786 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
1 vote
2 answers
981 views

I am using docker-java API to execute docker API in my project. I didn't find any suitable method which lists down docker CPU memory usage as GET /v1.24/containers/redis1/stats HTTP/1.1 with the help ...
UDIT JOSHI's user avatar
  • 1,396
0 votes
2 answers
455 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
0 votes
0 answers
2k views

Summary I am trying to use the docker-java library but I am running into a problem when I try to pull an image. I am trying to pull from a private repository on ECR. What I have tried Much of the ...
Daniel McC'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
3 votes
2 answers
3k views

In Java code I need to manage docker containers (restart, stop, start ...) using Docker-java library. https://github.com/docker-java/docker-java In Docker-Java examples I found the way to create and ...
Hans Pour's user avatar
  • 432
0 votes
1 answer
135 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
4 votes
3 answers
13k views

I have a docker DB setup method, which currently located in @BeforeAll. Currently, Construct as below @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public ...
Neil's user avatar
  • 3,106
5 votes
0 answers
637 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
1 vote
0 answers
208 views

I am trying to write java code to automate the docker commands that I execute. I am actually creating a mssql docker container and then want to restore a DB backup in that container. I am able to ...
Edward's user avatar
  • 11
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
1 vote
0 answers
612 views

I'm creating a mariaDB container via docker run with -v pathToSQL:/docker-entrypoint-initdb.d/script.sql option via Java. I have no idea how to find out when the container is ready to be connected ...
ogarogar's user avatar
  • 345
85 votes
3 answers
197k 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
2 votes
2 answers
2k views

I'm trying to start a docker container using docker-java. Using the method DockerClient.startContainerCmd works for me, but I need to start the container with arguments. The StartContainerCmd class ...
Idov's user avatar
  • 5,175
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
4 votes
1 answer
5k views

Each start of different testcontainers will throw com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://quay.io/v1/_ping: dial tcp x.x.x.x: getsockopt: connection ...
ner0's user avatar
  • 105