Tag: java

Docker Container interacting with 2 applications

I currently have a Java Application (.jar) in one container and I am using the docker-compose.yml to create an instance of a mysql database in a second container. I want to know if it is possible for the container 1 to be able to interect with container 2, and be able to read/write to and […]

Dockerfile with node, java, and Dynamodblocal

I am trying to create a docker file that contains the following Nodejs java (jre) Dynamodb local So far I was able to get the Node part done through node:argon but not sure how to get the rest done. This is what my Dockerfile looks like FROM node:argon # Create app directory RUN mkdir -p […]

Docker Compose JVM parameters

I wrote a java application that takes an environment variable that takes an argument to set a key for a JWT token salt key. Is there a way for me to pass the command variables in Docker Compose? java -Djava.security.egd=file:/dev/./urandom -jar /user-profile-api.jar –key=blah And to run the docker image you just docker run -p 8080:8080 […]

Building a docker image doesnt stop because of minecraft server continuing to run

So I have been trying to learn docker for a few days now and set a first goal for me. I want to run a spigot server inside a docker container and later on the road combine that with a BungeeCord network. I have run into problem. My dockerfile runs without problems but once it […]

How to convert JKS into Docker Registry cert/key?

I am trying to set up a secure Docker Registry on two VMs (for HA) and have a question about setting up the SSL. According to that link in the docs, I need to have a certs directory with two files in it: registry.crt – the CA cert registry.key – ??? (private key?) I have […]

Set ports for container in docker for docker-client for java

I can’t set publicPort and privatePort for container in docker. I creating docker container with java library docker-client for java https://github.com/spotify/docker-client I already had created a docker image locally “mobillogix/selenium-chrome”. DockerClient docker = DefaultDockerClient.fromEnv().build(); // Bind container ports to host ports final String[] ports = {“44444”, “59004”}; final String[] ports1 = {“4444”, “5900”}; final Map<String, […]

Dockerize Spring Boot Java app with Kafka, Zookeeper, and MongoDB [closed]

I am a beginner to Docker and web applications in general. I have to Dockerize a large Spring Boot Java app that uses Kafka, Zookeeper, and MongoDB. It also uses the Gradle build tool. What would be the best approach to Dockerize this app? Should I Dockerize it in one image, or a separate image […]

Docker stats from java

Please how can I run curl operation for docker-container in Java ? When I run this command on shell docker stats I got this result > CONTAINER CPU % MEM USAGE / LIMIT MEM % > NET I/O BLOCK I/O PIDS 08b45b1e3f56 > 0.00% 1.453 MiB / 995.9 MiB 0.15% 1.285 kB / 1.92 kB […]

Deploying WAR file in Docker container

We have made an user management web application in java with tomcat running on 8085 . The following is my Dockerfile content: FROM java:8 EXPOSE 8085 ADD /userman.war userman.war ENTRYPOINT [“java”,”-jar”,”userman.war”] Please suggest changes .

Can't reach localhost:8080 while running docker image

I have developed a small Java demo web app, using gradle, which I want to dockerize with WildFly. I have followed instructions from here. The Dockerfile is: FROM jboss/wildfly MAINTAINER Me <me@qmail.com> RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 –silent ADD build/libs/my-demo.war /opt/jboss/wildfly/standalone/deployments/ When I start the image with Docker and browse localhost:8080 or localhost:9990, I get a […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.