Skip to content

[问题反馈] 如何从源码构建 Docker 镜像 #257

@clinch-123

Description

@clinch-123

先决条件

  • 我已下载最新版本测试,问题依然存在
  • 我已认真查阅 使用说明 以及 常见问题
  • 我已确保 已有问题 中无类似 issue,否则请在已有的 issue 内进行讨论
  • 我已开启&关闭所有代理软件后测试,问题依然存在
  • 我已填写一个简洁明了的标题,以便他人快速检索

操作系统名称及版本号 (在终端执行命令以查看,Windows:winver,Linux:lsb_release -a,macOS:sw_vers)

centos7

配置信息

[root@VM-0-6-centos sonovel]# docker compose build
[+] Building 1.2s (12/12) FINISHED docker:default
=> [SONOVEL internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 476B 0.0s
=> [SONOVEL internal] load metadata for docker.io/library/eclipse-temurin:17-jre-jammy 0.7s
=> [SONOVEL internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [SONOVEL 1/7] FROM docker.io/library/eclipse-temurin:17-jre-jammy@sha256:93db0dba1dacb225fed826c2ae720adae9a71205f2b199b8af7e4df5be010cb7 0.0s
=> [SONOVEL internal] load build context 0.0s
=> => transferring context: 1.89kB 0.0s
=> CACHED [SONOVEL 2/7] RUN mkdir -p /app 0.0s
=> CACHED [SONOVEL 3/7] WORKDIR /app 0.0s
=> CACHED [SONOVEL 4/7] COPY so-novel-1.9.2.jar app.jar 0.0s
=> [SONOVEL 5/7] COPY config.ini . 0.0s
=> [SONOVEL 6/7] COPY rules ./rules/ 0.0s
=> [SONOVEL 7/7] RUN ls -la && java -jar app.jar --version || echo "JAR file is accessible" 0.3s
=> [SONOVEL] exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:7122f247e1764e92a74cdddf4a3d03ea0e5cfa9b0a602302b31b4ddf41d871f8 0.0s
=> => naming to docker.io/library/sonvel:latest 0.0s
[root@VM-0-6-centos sonovel]# docker compose down
[+] Running 2/0
✔ Container sonvel Removed 0.0s
✔ Network sonovel_default Removed 0.0s
[root@VM-0-6-centos sonovel]# docker compose up -d
[+] Running 2/2
✔ Network sonovel_default Created 0.0s
✔ Container sonvel Started 0.3s
[root@VM-0-6-centos sonovel]# docker compose logs -f
sonvel exited with code 1
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
^Ccanceled

问题描述

[root@VM-0-6-centos sonovel]# docker compose build
[+] Building 1.2s (12/12) FINISHED docker:default
=> [SONOVEL internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 476B 0.0s
=> [SONOVEL internal] load metadata for docker.io/library/eclipse-temurin:17-jre-jammy 0.7s
=> [SONOVEL internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [SONOVEL 1/7] FROM docker.io/library/eclipse-temurin:17-jre-jammy@sha256:93db0dba1dacb225fed826c2ae720adae9a71205f2b199b8af7e4df5be010cb7 0.0s
=> [SONOVEL internal] load build context 0.0s
=> => transferring context: 1.89kB 0.0s
=> CACHED [SONOVEL 2/7] RUN mkdir -p /app 0.0s
=> CACHED [SONOVEL 3/7] WORKDIR /app 0.0s
=> CACHED [SONOVEL 4/7] COPY so-novel-1.9.2.jar app.jar 0.0s
=> [SONOVEL 5/7] COPY config.ini . 0.0s
=> [SONOVEL 6/7] COPY rules ./rules/ 0.0s
=> [SONOVEL 7/7] RUN ls -la && java -jar app.jar --version || echo "JAR file is accessible" 0.3s
=> [SONOVEL] exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:7122f247e1764e92a74cdddf4a3d03ea0e5cfa9b0a602302b31b4ddf41d871f8 0.0s
=> => naming to docker.io/library/sonvel:latest 0.0s
[root@VM-0-6-centos sonovel]# docker compose down
[+] Running 2/0
✔ Container sonvel Removed 0.0s
✔ Network sonovel_default Removed 0.0s
[root@VM-0-6-centos sonovel]# docker compose up -d
[+] Running 2/2
✔ Network sonovel_default Created 0.0s
✔ Container sonvel Started 0.3s
[root@VM-0-6-centos sonovel]# docker compose logs -f
sonvel exited with code 1
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
^Ccanceled

复现步骤

[root@VM-0-6-centos sonovel]# docker compose build
[+] Building 1.2s (12/12) FINISHED docker:default
=> [SONOVEL internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 476B 0.0s
=> [SONOVEL internal] load metadata for docker.io/library/eclipse-temurin:17-jre-jammy 0.7s
=> [SONOVEL internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [SONOVEL 1/7] FROM docker.io/library/eclipse-temurin:17-jre-jammy@sha256:93db0dba1dacb225fed826c2ae720adae9a71205f2b199b8af7e4df5be010cb7 0.0s
=> [SONOVEL internal] load build context 0.0s
=> => transferring context: 1.89kB 0.0s
=> CACHED [SONOVEL 2/7] RUN mkdir -p /app 0.0s
=> CACHED [SONOVEL 3/7] WORKDIR /app 0.0s
=> CACHED [SONOVEL 4/7] COPY so-novel-1.9.2.jar app.jar 0.0s
=> [SONOVEL 5/7] COPY config.ini . 0.0s
=> [SONOVEL 6/7] COPY rules ./rules/ 0.0s
=> [SONOVEL 7/7] RUN ls -la && java -jar app.jar --version || echo "JAR file is accessible" 0.3s
=> [SONOVEL] exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:7122f247e1764e92a74cdddf4a3d03ea0e5cfa9b0a602302b31b4ddf41d871f8 0.0s
=> => naming to docker.io/library/sonvel:latest 0.0s
[root@VM-0-6-centos sonovel]# docker compose down
[+] Running 2/0
✔ Container sonvel Removed 0.0s
✔ Network sonovel_default Removed 0.0s
[root@VM-0-6-centos sonovel]# docker compose up -d
[+] Running 2/2
✔ Network sonovel_default Created 0.0s
✔ Container sonvel Started 0.3s
[root@VM-0-6-centos sonovel]# docker compose logs -f
sonvel exited with code 1
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
sonvel | no main manifest attribute, in app.jar
^Ccanceled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions