当我运行“mvn spring-boot:build-image”时,为什么我收到此错误“构建器生命周期“创建者”失败,状态代码为 51”

问题描述 投票:0回答:1

我正在学习 Docker,并且正在尝试创建当前 Spring 项目的镜像。

我正在尝试运行 mvn spring-boot:build-image 为我的 Spring Boot 项目创建 docker 映像,但在执行时出现此错误

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.5:build-image (default-cli) on project config-server: Execut
ion default-cli of goal org.springframework.boot:spring-boot-maven-plugin:3.2.5:build-image failed: Builder lifecycle 'creator' failed with status code 51

这是我的 pom.xml。如果您需要更多,请随时询问。

4.0.0 org.springframework.boot spring-boot-starter-父级 3.2.5 com.ahamed.companyms 公司管理系统 0.0.1-快照 公司管理系统 使用 Spring Boot 的微服务 17 2023.0.0 org.springframework.boot spring-boot-starter-数据-jpa org.springframework.boot spring-boot-启动器-web org.postgresql PostgreSQL 运行 org.projectlombok 龙目岛 真的 org.springframework.cloud spring-cloud-starter-netflix-eureka-客户端 org.springframework.boot spring-boot-starter-amqp

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>


    <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-tracing-bridge-brave</artifactId>
    </dependency>
    <dependency>
        <groupId>io.zipkin.reporter2</groupId>
        <artifactId>zipkin-reporter-brave</artifactId>
    </dependency>

    <dependency>
        <groupId>io.github.openfeign</groupId>
        <artifactId>feign-micrometer</artifactId>
    </dependency>
</dependencies>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>

    </plugins>
</build>
i coud not figure out what mistake i did. i am trying to fix this error for 6 hours. please help me fix this. feel free to ask if you need more.
java spring-boot docker maven
1个回答
0
投票

请包含您的 docker 文件。怀疑您是否写了任何错误的命令或拼写错误,这可能会导致问题。

© www.soinside.com 2019 - 2024. All rights reserved.