Category : maven

Spring boot application maven build: $ ./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=localhost:5000/apps/demo $ docker push localhost:5000/apps/demo What is the the first command do? When I do the push to localhost:5000 I get: Using default tag: latest The push refers to repository [localhost:5000/apps/demo] Get http://localhost:5000/v2/: dial tcp [::1]:5000: connect: connection refused But is the localhost:5000 a local registry? Which ..

Read more

snippet from pom.xml: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <image>vasanth0202/microservice-${project.artifactId}:${project.version}</image> <pullPolicy>IF_NOT_PRESENT</pullPolicy> </configuration> </plugin> </plugins> </build> Getting this error while building this in eclipse, Run As-> Maven build -> Goals (spring-boot:build-image -DskipTests) -> Run [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.2:build-image (default-cli) on project currency-exchange-service: Unable to parse configuration of mojo org.springframework.boot:spring-boot-maven-plugin:2.5.2:build-image for parameter image: Cannot find ..

Read more

I tried deploying my docker image, which uses maven to package the war file, onto Heroku, but I keep getting an error. Here’s what I have in my dockerfile: FROM maven:3.6.0-jdk-11-slim AS BUILD COPY . /usr/src/app/ RUN mvn -f /usr/src/app/pom.xml clean package FROM jboss/wildfly:21.0.2.Final COPY –from=BUILD /usr/src/app/Web-Service/target/web-service-1.0-SNAPSHOT.war /opt/jboss/wildfly/standalone/deployments/web-service.war EXPOSE 8080 9990 8009 CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", ..

Read more

I have a spring application. I want to utilize multi stage builds and first build a jar file, and then use this jar file when building a docker image. I don’t have a jar image built before the dockerfile is ran. FROM openjdk:8-jdk as BUILD COPY src/main/java/myapp/MyApp.java /src/ RUN cd /src/ && javac MyApp.java (or ..

Read more

I am trying to create docker image using below docker file, in multistage setup # the first stage of our build will extract the layers FROM myorg.repository.com:8081/fsorg/base-java-service:java16 as builder WORKDIR application ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract # the second stage of our build will copy the extracted layers FROM ..

Read more

I got this error when deploying Maven through GitlabCI, docker image: maven:3-jdk-8. Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.mycompany.app:app-all:0.9.3-SNAPSHOT: Could not transfer artifact com.mycompany:parent:pom:8 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [app-releases (http://nexus.mycompany.com/content/repositories/app-releases, default, releases+snapshots), app-snapshots (http://nexus.mycompany.com/content/repositories/app-snapshots, default, releases+snapshots)] and ‘parent.relativePath’ points at wrong local POM @ line ..

Read more