Category : java

My property file is getting picked from code when i am passing the external file its not getting overwriting Below is my Dockerfile FROM openjdk:11.0.11-jdk VOLUME /tmp VOLUME /app VOLUME /app/properties VOLUME /app/offline_data VOLUME /app/certs ENV JAVA_OPTS="" ARG JAR_FILE ADD ${JAR_FILE} /app/emm.jar WORKDIR /app COPY src/main/resources/application.properties /app/properties/emmapplication.properties EXPOSE 8080 ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS ..

Read more

My property file is getting picked from code and when passing the external file its not getting overwritten. Below is my Dockerfile: FROM openjdk:11.0.11-jdk VOLUME /tmp VOLUME /app VOLUME /app/properties VOLUME /app/offline_data VOLUME /app/certs ENV JAVA_OPTS="" ARG JAR_FILE ADD ${JAR_FILE} /app/emm.jar WORKDIR /app COPY src/main/resources/application.properties /app/properties/emmapplication.properties EXPOSE 8080 ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom ..

Read more

I have a maven java application with application.properties file in resources directory, and I have generated a .jar, and I want to override application.properties file inside .jar from docker environment variables. application.properties: url=myurl Dockerfile: FROM openjdk:8-jdk-alpine COPY target/app.jar app.jar COPY myentrypoint.sh / CMD ["sh", "/myentrypoint.sh"] myentrypoint.sh #!/bin/bash # if the env var URL is not ..

Read more

I am running Linux cosmos emulator with below configurations (as per official Microsoft documention) on Ubuntu 20.04.3 ( I tried 18.04 as well) ipaddr="`ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk ‘{print $2}’ | head -n 1`" sudo docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator sudo docker run -d -p 8081:8081 -p 10251:10251 -p 10252:10252 -p ..

Read more

I have an app which is dockerized like this: FROM openjdk:11-jre-slim as jdkbase FROM jdkbase COPY target/dependency-jars /run/dependency-jars COPY target/resources /run/resources ADD target/app-1.0.2.jar /run/app-1.0.2.jar CMD java -jar run/app-1.0.2.jar This app uses some configs from application.properties. I push this docker image into my private registry for using it inside Kubernetes cluster. There is no problems unless ..

Read more

I have deployed the application developed on springboot and used hazelcast . The application is getting compiled well but when it is getting deployed on kubernetes(docker simulated kubernetes) I am getting the error as below. There is no compilation error but only runtime error. Node.log(69) – Node creation failed java.lang.NoClassDefFoundError: com/hazelcast/core/DuplicateInstanceNameException at java.lang.Class.forName0(Native Method) at ..

Read more