Tag: java

Dockerizing Spring Applicaiton

I have a working app using Spring Framework + AngularJs front-end. I do deploy it on amazon AWS before by simply packaging mvn package into .war file. Now I need to setup a linux env in docker locally to debug some additional functionality (Using windows as the main OS) and preferably to deploy this docker […]

kubernetes stateful set connection

I start experiencing with statefulsets, and I’m following this link on kubernetes website http://kubernetes.io/docs/tutorials/stateful-application/run-replicated-stateful-application/ How can I connect my java application to the mysql database statefulset (they are all in same kubernetes cluster node and namesapce)? what service should I connect to ? which address should I use ? I tried mysql-read.default.svc.cluster.local:3306 didn’t work !!!

Docker : Install Maven dependencies during build stage only?

Still new to Docker and trying to get a Jetty webservice to run inside a container. This is my docker file at the moment Recipe FROM maven:3.3-jdk-8-alpine # Install packages # To find packages to install see – https://pkgs.alpinelinux.org/packages RUN apk add –no-cache curl tar bash wget apache-ant RUN apk info # Do any Maven […]

Disable docker container log configuration in Chef

Through Chef cookbook, I am creating the Docker container I want to disable the docker container log because I have my own application log, I have included the code based on this URL .But even after including this configuration docker container logs are created. Please help to solve this. # Run container exposing ports docker_container […]

Can't build docker image via gradle on Windows 10

I am new to Docker and i have problems with building image from the gradle script using gradle-docker-plugin : task dockerBuildImage(type: DockerBuildImage, dependsOn: [dockerCreateDockerfile, assemble]) { tag = “my_tag_here” dockerFile = dockerCreateDockerfile.destFile inputDir = dockerCreateDockerfile.destFile.parentFile } And than i am getting such stacktrace: Building image using context ‘D:\Learning\1\myproject\webapp\build’. Using Dockerfile ‘D:\Learning\1\myproject\webapp\build\Dockerfile’ Using tag ‘localhost:5000/test/myproject-webapp:1.0.0-20170318135307’ for […]

Which java 8 docker image contains jmap?

I’m want to use jmap but the docker image java:8-jre doesn’t have it. Which java docker image would have it?

Docker container vs Java Virtual Machine

Is it true to say that to a high degree what is now done in docker containers can also be done in java with jvm if someone wanted to ? Besides being able to write an application in your own language and having much customisation flexibility does docker basically do what Java has been doing […]

How to get the Docker Container Id from inside a running docker image via Java API?

Not finding anything on the University of Google so checking here. I have an enterprise application running on an application server inside a docker image. During the running time, the enterprise application needs to use a Java API call to obtain the Docker Container Id that it’s running in. How is this done?

Running SpringBootApplication PostConstruct and PreDestroy

I have troubles with running spring application in docker container (both spring and docker have latest versions in my environment). I want to have healthy life cycle for application class AnalysisServiceBootstrap: to run initialization code with method start() right AFTER creation of AnalysisServiceBootstrap and also to run method stop() right BEFORE destruction of AnalysisServiceBootstrap (I […]

Connecting to postgres from a docker container

I’m a little lost as to why my java application can’t connect to my postgres database. I’m aiming to connect to a postgres database through jdbc. The application is to run inside a docker container. this.connection = `DriverManager.getConnection(“jdbc:postgresql://<myip>:5432/databasename”, “usr”, “password”);` I’m getting the exception: Connection refused. Check that the hostname and port are correct and […]

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