【问题标题】:M1 Mac A problem occurred starting process 'Gradle build daemon'M1 Mac 启动进程“Gradle build daemon”出现问题
【发布时间】:2022-10-12 23:01:07
【问题描述】:

我克隆了this repo 并尝试通过在终端中运行命令docker-compose up --build -d 在我的M1 Mac 上运行它,这是输出:

Building myapp
[+] Building 144.5s (13/14)                                                     
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 536B                                       0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/library/openjdk:13              1.0s
 => [auth] library/openjdk:pull token for registry-1.docker.io             0.0s
 => [internal] load build context                                          0.1s
 => => transferring context: 82.08kB                                       0.0s
 => [build 1/7] FROM docker.io/library/openjdk:13@sha256:08ab736e5b08665c  0.0s
 => CACHED [deploy 2/3] RUN mkdir -p /opt/app                              0.0s
 => CACHED [build 2/7] RUN mkdir -p /workspace                             0.0s
 => CACHED [build 3/7] WORKDIR /workspace                                  0.0s
 => [build 4/7] COPY . .                                                   0.0s
 => [build 5/7] RUN yum install -y wget unzip                             89.6s
 => [build 6/7] RUN wget -O /tmp/gradle.zip https://services.gradle.org/  49.4s
 => ERROR [build 7/7] RUN /opt/gradle/bin/gradle build                     4.4s 
------                                                                          
 > [build 7/7] RUN /opt/gradle/bin/gradle build:                                
#13 3.142                                                                       
#13 3.142 Welcome to Gradle 6.1!                                                
#13 3.142                                                                       
#13 3.143 Here are the highlights of this release:                              
#13 3.143  - Dependency cache is relocatable
#13 3.144  - Configurable compilation order between Groovy, Java & Scala
#13 3.144  - New sample projects in Gradle's documentation
#13 3.144 
#13 3.145 For more details see https://docs.gradle.org/6.1/release-notes.html
#13 3.145 
#13 4.047 Starting a Gradle Daemon (subsequent builds will be faster)
#13 4.342 
#13 4.343 FAILURE: Build failed with an exception.
#13 4.344 
#13 4.344 * What went wrong:
#13 4.345 A problem occurred starting process 'Gradle build daemon'
#13 4.345 
#13 4.345 * Try:
#13 4.346 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
#13 4.348 
#13 4.348 * Get more help at https://help.gradle.org
------
executor failed running [/bin/sh -c /opt/gradle/bin/gradle build]: exit code: 1
ERROR: Service 'myapp' failed to build : Build failed

我在 docker-compose 文件中添加了platform: linux/amd64,并确保安装了所有依赖项,但我不知道如何解决这个问题。我尝试终止所有守护进程,但这也没有解决问题。

【问题讨论】:

  • 您应该使用 --stacktrace 和 --debug 重新运行它,以便您可以更深入地了解这一点。

标签: java spring-boot docker gradle apple-m1


【解决方案1】:

我有同样的问题,升级我的 docker 桌面版本似乎已经解决了。

https://docs.docker.com/desktop/mac/apple-silicon/

我希望它有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-04
    • 2021-08-06
    • 1970-01-01
    • 2022-07-02
    • 2021-11-29
    • 2021-12-31
    • 2020-01-17
    相关资源
    最近更新 更多