Tag: java

Deploying Java app to Docker image

I have an executable JAR that is normally executed like so: java -jar myapp.jar I would like to “Dockerize” this app by placing it in a container, say, under /~/myapp, and then configure the container to always run this app (using the above command) when the container starts up. Using this sample Dockerfile as a […]

Tomcat's Spring app properties with docker container linking

I have been playing a bit with docker. I have my mysql container docker run –name mymysql -d mysql/mysql-server:5.6 my tomcat container where my app is deployed docker run –link mymysql:mysql -d my tomcat in the tomcat container I can see (because of the linking) .. MYTOMCAT_PORT_8080_TCP_ADDR= .. and in the /etc/hosts mysql in […]

502 error when viewing Java liberty Bluemix application using Docker container

I created a Java Liberty application on Bluemix and cloned the sample code from the JazzHub Git repository linked to the application. I then copied the JavaHelloWorldApp.war file to the base directory of the sample code and created a Dockerfile with the following text: FROM registry.ng.bluemix.net/ibmliberty:javaee7 ADD JavaHelloWorldApp.war /opt/ibm/wlp/usr/servers/defaultServer/dropins/ I set up the DevOps pipeline […]

Docker Java memory usage

Hi i have some issue to understand how docker java container is using memory of the host machine i gave the continer JVM opt “JAVA_OPTS=-XX:MaxMetaspaceSize=1024m -Xms=512m -Xmx=1024m -XX:PermSize=512m -XX:MaxPermSize=1024m ” But when im runnig docker stats to the container i see that MEM USAGE is 1.6GB Is docker allocating memory for the none JVM parts […]

Communication between spring boot dockerized apps

I new using spring boot and docker and I faced a problem running the docker containers. On debug mode, there is no problem on applications boot, but when I run them as a container, there is something wrong. For example, I have my server config with all the yml files, also eureka properties. The config […]

Cannot connect to exposed Docker port

I’m running Docker on OS X using the latest Docker Toolbox. Docker version 1.10.2, build c3959b1 docker-machine version 0.6.0, build e27fb87 docker-compose version 1.6.0, build d99cad6 I have a Java app in a container built from the following Dockerfile: FROM <my internal registry>/java:8 ENTRYPOINT [“java”, “-cp”, “/var/app/scheduler/scheduler-jar-with-dependencies.jar”, “com.myapp.scheduler.Application”] and docker-compose.yml: scheduler: image: <my internal registry>/scheduler […]

Building a Docker images fails when a User tries to execute javac

I’m trying to create a Dockerfile, but if I add a User it keeps failing during the building process. If I remove the User the building process of the images succeeds, but I need the User, cause it is a requirement for the Code Climate engine I am working on. Dockerfile: FROM java MAINTAINER DavidRenz […]

Gradle clean task with bmuschko/gradle-docker-plugin

I’m trying to create a Gradle task that will run a clean, a build, and then run a buildDockerImage task from the bmuschko/gradle–docker-plugin plugin. I can successfully run the clean task, build task, and buildDockerImage task in separate commands in the command line but when I try to create a singe task that does all […]

Monitoring Glassfish 4 on Docker with JVisualVM

I’m not able to connect JVisualVM to Glassfish running on Docker. I’m using the glassfish nightly image and I’m exposing port 8686. On Startup Glassfish is logging the following: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://55bbdd404578:8686/jndi/rmi://55bbdd404578:8686/jmxrmi The IP of my docker host is and I can connect via telnet on port 8686. The […]

Execute docker commands from java/jsp/html page

I have to run commands to start docker container from the jsp page. when user enters his credentials on login page, I have to start mysql container and other containers too.How can we achieve this? Suggest a solution to trigger/run a docker command from the java/jsp/html file.

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