Tag: java

Connecting to remote activemq instance running on docker container

I have 2 docker containers, one running a spring app (in tomcat) and one running an active mq instance. When I try to connect to it from my spring app, I get the following error. Only activeMQ is running on the one container and the port is properly exposed. I verified the IP address of […]

Ambari-Server on Docker Java install issues

Today I hit a issues with my Ambari-Server install on a virtually blank system: [root@<server>/]# ambari-server setup Using python /usr/bin/python2.6 Setup ambari-server Checking SELinux… SELinux status is ‘disabled’ Customize user account for ambari-server daemon [y/n] (n)? Adjusting ambari-server permissions and ownership… Checking firewall status… FATAL: Could not load /lib/modules/2.6.32-504.16.2.el6.x86_64/modules.dep: No such file or directory iptables […]

Organization of pods in cluster in Google Container Engine

What is the usual way to organize pods in a cluster in Kubernetes? I have a Jenkins build server, Docker registry, Git repository and other development tools that I want to run in Google Container Engine. Do I create one cluster for each of them? Or can multiple pods be scheduled on each node? So […]

Get cpu usage from Java API 1.13 for docker 1.1.2

I am trying to obtain the amount of cpu (measured in time or percentage, any one) utilized by a specific container deployed using docker as: docker run <container_name> or using lxc as: lxc-start -n <container_name> I see that the container deployed using lxc has cpu usage statistics stored in /sys/fs/cgroup/cpuacct/cpuacct.stat However, I want to obtain […]

Connecting to an H2 Database in a Docker Container

I have a basic Spring Boot Data JPA project. The h2 database that I’m connecting to is located at /tmp/customerdb.h2.db. When running the application using mvn spring-boot:run everything works fine. The application connects to the database, adds records, and prints the added records to the console. I then build a docker container, and run it. […]

Bash script behaves differently from Docker run command instead of inside container itself?

I am running the Docker 1.0.1 client on Ubuntu 12.0.4 LTS. I have a container that runs a Java application in server mode. There is a Bash script in the container that launches the server. If I execute the bash script from inside the container’s the Java application runs fine. If I append the bash […]

Generation of pdf PDFBox headless docker container fails

I am using pdfbox to create pdfs in Java. This works fine when running from my Mac as a normal Java application. However, the use case is to run this from server side to generate the pdf from a web browser. I have deployed the application into a docker container and now fails to work […]

I want to implement docker in spring and hibernate application using gradle

I had develop an application using gradle and spring-Hibernate. Now i want to implement docker in the same. Can somebody tell me how to proceed. i read many tutorials of docker but unable to get the right resource.

Apache Kafka on Docker – stops after few hundred pools

I have a problem with running Kafka that is used as event store in Java application. Kafka version: 0.10.1.0 Java lib version: 0.10.1.0 Docker version: current edge (17.06.0-ce, build 02c1d87) (same problem on stable release) Java 1.8 Docker compose version: 3.3 Kafka stops suddenly after 147 requests. Any changes to configuration, docker setup, host machine […]

Customize docker-java response to remove some logger like stream

I am using docker java version 3.0.10. I can write code to perform different operations using that version. I am getting response like following : com.github.dockerjava.api.command.InspectImageResponse@3e690a97[arch=amd64,author=,comment=,config=com.github.dockerjava.api.model.ContainerConfig@3dbaa748[attachStderr=false,attachStdin=false,attachStdout=false,cmd={sh},domainName=,entrypoint=<null> ……………………(so on json) ] However, I want JSON response and want to remove appended line com.github.dockerjava.api.command.InspectImageResponse@3e690a97, like in each response am getting. Please give me way to do that. […]

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