Tag: java

docker runs image on wrong port

I have a spring boot application and I created dockerfile like this one : FROM java:8 EXPOSE 80 ADD /target/test-server.jar test-server.jar ENTRYPOINT [“java”,”-jar”,”test-server.jar”] Next I follow these steps : docker build -t test-server . docker run -p 8888:80 -t test-server and it works but on port 8080 , which is default to tomcat. I want […]

Push Docker Images into docker.io

I am able to prepare a image , but cannot to push it into the docker.io account, https://hub.docker.com/r/ahmetkarakaya/repo1/ mvn package docker:build -DpushImage [INFO] [INFO] — maven-jar-plugin:2.6:jar (default-jar) @ gs-spring-boot-docker — [INFO] Building jar: C:\Users\ttahkarakaya.TCLL\Desktop\gs-spring-boot-docker\complete\target\gs-spring-boot-docker-0.1.0.jar [INFO] [INFO] — spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ gs-spring-boot-docker — [INFO] [INFO] — docker-maven-plugin:0.4.11:build (default-cli) @ gs-spring-boot-docker — [INFO] Copying C:\Users\ttahkarakaya.TCLL\Desktop\gs-spring-boot-docker\complete\target\gs-spring-boot-docker-0.1.0.jar -> C:\Users\ttahkarakaya.TCLL\D […]

receiving runtime error on docker container only for specific machine

I have a 3rd party java webapp that runs within apache Tomcat. We are using docker to run this application. When run on my machine, we receive an error I want to stress that we do not build this .war. We do not own this .war. We are simply trying to spin up a docker […]

Unable to deploy my application to remote docker

I have downloaded Client Bundles from Docker UCP and able to connect to docker and execute docker commands (docker ps , docker images etc) from my local machine . Now i want to deploy my application image to remote docker when i execute mvn package docker:build i am getting following Exception Failed to execute goal […]

How to access War File Build deployed in Tomcat Docker Container after deleting root

my docker file: FROM tomcat MAINTAINER “Shan Khan <xxx@gmail.com”> RUN [“rm”, “-rf”, “/usr/local/tomcat/webapps/ROOT”] COPY ROOT.war /usr/local/tomcat/webapps/ CMD [“/usr/local/tomcat/bin/catalina.sh”, “run”] running as: sudo docker build -t webserver sudo docker run -it –rm -p 8080:8080 webserver tomcat is running but im unable to access in the localhost:8080 or localhost:8080/ROOT

Cannot install RWeka package in docker image

I am using a java image, with R installed as I need it, however when I am installing an RWeka package I get an error Here is my Dockerfile below: FROM buildpack-deps:jessie-scm # A few problems with compiling Java from source: # 1. Oracle. Licensing prevents us from redistributing the official JDK. # 2. Compiling […]

use docker-client api to start container in Java project

I am now using docker client api https://github.com/docker-java/docker-java in my Java project: CreateContainerResponse container = dockerClient .createContainerCmd(“ubuntu:java7”) .withCmd(“true”) .exec(); dockerClient .startContainerCmd(container.getId()) .exec(); When I start a new container using docker client api,the container is created,but i also finished.I use command “sudo docker ps” to list the running container now, what I created is not shown.I […]

Unable to find Spring libraries on the classpath

Demo project in GitHub I am trying to run a simple Spring 3.2.13 WebApp, inside a Docker Container running Jetty 7.6.3 with provided library dependencies. I’m doing this for legacy reasons. The company I am working for has existing infrastructure that I am needed to fit into. I have created a basic Spring WebApp that […]

Fitnesse error when used with spotify maven plugin and docker

I am using spotify maven plugin to create a fitnesse docker image and run it on a container. I am able to bring the fitnesse up and run the tests successfully locally without using spotify maven plugin and docker but not when I use those. I get the following error when I start the fitnesse […]

hbase hadoop DNS static init fails with UnknownHostException in docker while spring bean init if log file exists, but works after init

We have a spring boot service running in a docker container which uses hbase running in another docker container on the same host machine. The service also uses log4j2 for rolling logs. Log file path is mapped to the shared host directory via docker volume. The problem happens only if log file exists from the […]

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