Category : spring

I’m trying to run a project that I built in spring boot with docker, which ran fine before docker, but since I tried to integrate it with docker-compose, I’ve been running into issues getting the spring-boot app to run. My docker-compose.yml looks like this: version: ‘3.1’ services: web: image: kynphlee/jobsearchtracker container_name: web environment: SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/jobsearchtracker?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC ..

Read more

I am building my spring boot native application on an alpine (openjdk:13-alpine) docker image. ./mvnw spring-boot:build-image -DskipTests When doing this I got an error : [INFO] Building image ‘docker.io/library/bff-distributor:0.0.1-SNAPSHOT’ [INFO] [INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory [INFO] Retrying request to {}->docker://localhost:2376 [INFO] I/O exception ..

Read more

I have trouble run mongodb in windows 10 and I have already done: docker volume create –name = mongodata and then docker run -p 27017:27017 -v mongodata:/data/db -d mongo but I get this error: docker: Error response from daemon: invalid volume specification: ‘mongodata:/data/db’. See ‘docker run –help’. by doing it this way: docker run -p ..

Read more

I have one apps which contains 10 java main class . Each main class has own responsibility. I want to call each class in docker using class name parameter. My Docker Image like below. FROM azul/zulu-openjdk-alpine:11 ADD xyzproject/target/abc.jar abc.jar CMD ["java", "-cp", "abc.jar" ,"Class1"] I want to run multiple class using docker run argument parameter ..

Read more

I’m trying to put springboot application packaged in .jar in docker container and use connection to database which is inside another docker container. When launching application from Idea (while db already running on docker container) everything works fine. However, it’s not working as intended when .jar is inside container, and returns next error: application | ..

Read more

I’m trying to set up a Spring Boot API w/ MySQL containers in an app service. This is the docker-compose file that I’m using: version: ‘3.8’ services: mysql: image: mysql:8 container_name: mysql restart: always environment: – MYSQL_ROOT_PASSWORD=${__dc__MYSQL_ROOT_PASSWORD} – MYSQL_USER=${__dc__MYSQL_USERNAME} – MYSQL_PASSWORD=${__dc__MYSQL_PASSWORD} – MYSQL_DATABASE=${__dc__MYSQL_DATABASE} thesisapi: image: ${__dc__IMAGE} container_name: thesisapi restart: always ports: # Azure Web App ..

Read more

I run 3 separate spring-boot applications with docker-compose… docker composition is in this question: Docker compose problem , one application on all ports (problem resolverd by adding 2 separate Dockerfiles, as @anemyte answer) Now I came to another problem. Applications run on their ports, I can post elements, it’s OK. Problem comes when I try ..

Read more

I am running spring boot services using docker-compose. project link Eureka server Two services are registered in one instance instead of each one separated instances. @SpringBootApplication @EnableEurekaClient public class OrganizationApplication { @Bean @LoadBalanced public RestTemplate getRestTemplate(){ RestTemplate restTemplate = new RestTemplate(); return restTemplate; } public static void main(String[] args) { SpringApplication.run(OrganizationApplication.class, args); }} application.yml eureka: ..

Read more

I have run Rabbitmq as a docker compose and it work well with port 15672 on browser, but 5672 not working. docker-compose rabbitmq: image: ‘rabbitmq:3-management-alpine’ container_name: rabbitmq ports: – ‘5672:5672’ – ‘15672:15672’ environment: – RABBITMQ_NODE_TYPE=stats – [email protected] – RABBITMQ_ERL_COOKIE=s3cr3tc00ki3 – RABBITMQ_DEFAULT_USER=rabbitmquser – RABBITMQ_DEFAULT_PASS=rabbitmquser volumes: – ‘/rabbitmq/data:/var/lib/rabbitmq/’ – ‘/rabbitmq/log:/var/log/rabbitmq’ spring application.properties spring.rabbitmq.host = 192.168.1.212 spring.rabbitmq.port = ..

Read more