In our J2EE project, we want to call sjourdan/ffmpeg docker through the docker-java library.
A typical call for ffmpeg conversion will be something like:
docker run --rm -v /e/data:/tmp/workdir sjourdan/ffmpeg -i /tmp/workdir/test.mov -f mp4 -vcodec…
In our J2EE project, we're doing some video conversion by calling sjourdan/ffmpeg docker from our java code, relying on docker-java.
For now, it looks something like this (quite simplified for brevity):
CreateContainerCmd createCommand =…
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, instead of creating a completely new container?
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.
@Testcontainers
public class SftpServerTestContainer…
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 testcontainers.
Using versions:
Docker desktop…
I'm using the docker-java library in a command-line project, doing things like this:
private DockerClient client;
public Docker() {
var config = DefaultDockerClientConfig
.createDefaultConfigBuilder()
…
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 https://github.com/docker-java/docker-java using all…
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 runtime, since I need to use it in a script…
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 that is returned from this method does not have any…
I have successfully deployed a local docker registry and implemented an listener endpoint to receive event notifications following the documentation for configuration using a sample insecure configuration file. Pushing, pulling and listing images…
I'am running docker on windows server 2016, when I try to build an image with a Dockerfile that contains this text:
FROM openjdk:8-jdk-alpine
ADD target/eureka-server-one.jar app.jar
EXPOSE 8761
ENTRYPOINT…
Using GenericContainer#execInContainer I can only get stdout or stderr.
Is there any way to get exit code of executed command?
I can't rely on the presence of text in stderr. The application I execute prints some info to stderr but exits with code…
I'm using docker-java to create an image on a docker host which is running on a Ubuntu 16.04 VM. The image creation works just fine and I can list the image created via docker-java. But when I try to push the image to a private registry(Harbor) I…
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)
.withStdErr(true)
.withStdOut(true)
…
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 method is void.
Does anyone know how can I get the…