Category : docker-java

I deployed the following containers on my local machine: student-app: is my testing application karson-jenkins: is my first jenkins which was run with published localhost ip and port 8082 and docker network as bridge karson-jenkins-host: is my second jenkins which was run with docker network as host I am able to launch and navigate to ..

Read more

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 community: 2.5.0.0 org.testcontainers:testcontainers:1.15.0 org.springframework.boot 2.3.4. My code looks like the following: @ClassRule public static DockerComposeContainer environment = new ..

Read more

I can create, start and retrieve an instance of a docker container like this: CreateContainerResponse response = dockerClient.createContainerCmd(imageId).exec(); String containerId = response.getId(); dockerClient.startContainerCmd(containerId).exec() Container container = dockerClient.listContainersCmd() .withIdFilter(Collections.singletonList(containerId)) .exec() .get(0); However, the Container object does not appear to expose the hostname. I can also inspect a running container like this: InspectContainerResponse response = dockerClient.inspectContainerCmd(container.getId()).exec() Again, ..

Read more

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 way out… docker-java: ‘com.github.docker-java’, name: ‘docker-java’, version: ‘3.2.5’ The follow code lists images from public docker hub, not really ..

Read more

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 [“java”, “-jar”, “app.jar”] These are the steps i followed: cd to directory where docker file is kept docker build . docker run -d -p ..

Read more