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…
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. So I do:
public WiremockContainer() {
…
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 parameter, so I can spawn…
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, first I start it, then I want to get a network out…
I'm using the Docker Java client in a Scala project to programmatically create images and start containers with volume(s), then when this is all done also execute a Java class within a jar file that is available in one of the attached volumes.
//…
I want to create and run docker using docker java client. I want running something like this :
docker run -d -p 4444:4444 --name selenium-hub selenium/hub:2.53.0
How to implement this command on docker-java client? Here is my code so far…
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 DockerConstructorTest{
@BeforeAll
public…
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 refused"}
This is no surprise (docker is behind a…
I am running a container with name tag which allows me to identify it.In docker-java,it requires container id for most of the operations and i do not know how to get that using docker-java.Can anyone help me how to get the container Id for the…
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…
I am trying to use the docker remote API from java using docker-java and I'm struggling to find a way to see when the execution of my container has finished:
CreateContainerResponse container = dockerClient.createContainerCmd("me/vw:v0.1")
…
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 to be shown to the user. To be more precise: the…
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 class DockerPull {
public static void…
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 get…
I am quite desperately trying to set up docker tests in Scala.
I have created an example project on GitHub to understand how should I set up the environment. It is available here: https://github.com/atais/sbt-scala-docker-cassandra
I have selected…