微信云托管上直接拉取github时的Dockerfile报了如下错误,目前是docker的初学者,查了资料仍未解决该问题,请教各位。
部署开始于 2022-12-30 21:04:13
AppID: wx605f6fab021e9174
环境名称:prod-2git6eqge91e8414
[1/2] 创建版本 失败 32s 创建版本失败:任务失败
[2022-12-30 21:04:25] Started by user coding
[2022-12-30 21:04:25] Running in Durability level: MAX_SURVIVABILITY
[2022-12-30 21:04:27] [Pipeline] Start of Pipeline
[2022-12-30 21:04:30] [Pipeline] node
[2022-12-30 21:04:30] Running on Jenkins in /root/workspace
[2022-12-30 21:04:30] [Pipeline] {
[2022-12-30 21:04:30] [Pipeline] stage
[2022-12-30 21:04:30] [Pipeline] { (检出 ZIP 包)
[2022-12-30 21:04:30] Stage "检出 ZIP 包" skipped due to when conditional
[2022-12-30 21:04:30] [Pipeline] }
[2022-12-30 21:04:30] [Pipeline] // stage
[2022-12-30 21:04:31] [Pipeline] stage
[2022-12-30 21:04:31] [Pipeline] { (检出代码仓库)
[2022-12-30 21:04:31] [Pipeline] sh
[2022-12-30 21:04:31] + git clone ****** .
[2022-12-30 21:04:31] Cloning into '.'...
[2022-12-30 21:04:35] [Pipeline] sh
[2022-12-30 21:04:35] + git checkout main
[2022-12-30 21:04:35] Already on 'main'
[2022-12-30 21:04:35] Your branch is up-to-date with 'origin/main'.
[2022-12-30 21:04:35] [Pipeline] }
[2022-12-30 21:04:35] [Pipeline] // stage
[2022-12-30 21:04:35] [Pipeline] stage
[2022-12-30 21:04:35] [Pipeline] { (构建 Docker 镜像)
[2022-12-30 21:04:35] [Pipeline] sh
[2022-12-30 21:04:36] + docker login -u ****** -p ****** ccr.ccs.tencentyun.com/tcb-******-azoi/ca-gkcxkocn_halo:halo-001-20221230210423
[2022-12-30 21:04:36] WARNING! Using --password via the CLI is insecure. Use --password-stdin.
[2022-12-30 21:04:36] WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
[2022-12-30 21:04:36] Configure a credential helper to remove this warning. See
[2022-12-30 21:04:36] https://docs.docker.com/engine/reference/commandline/login/#credentials-store
[2022-12-30 21:04:36]
[2022-12-30 21:04:36] Login Succeeded
[2022-12-30 21:04:36] [Pipeline] sh
[2022-12-30 21:04:36] + docker build -f ././/Dockerfile -t ccr.ccs.tencentyun.com/tcb-******-azoi/ca-gkcxkocn_halo:halo-001-20221230210423 ./
[2022-12-30 21:04:36] Sending build context to Docker daemon 44.45MB
[2022-12-30 21:04:36] Step 1/15 : FROM eclipse-temurin:17-jre as builder
[2022-12-30 21:04:37] 17-jre: Pulling from library/eclipse-temurin
[2022-12-30 21:04:37] 6e3729cf69e0: Pulling fs layer
[2022-12-30 21:04:37] 4d8d923227d8: Pulling fs layer
[2022-12-30 21:04:37] 5834fb29a8c0: Pulling fs layer
[2022-12-30 21:04:37] 2dc10fb88481: Pulling fs layer
[2022-12-30 21:04:37] 2dc10fb88481: Verifying Checksum
[2022-12-30 21:04:37] 2dc10fb88481: Download complete
[2022-12-30 21:04:38] 4d8d923227d8: Verifying Checksum
[2022-12-30 21:04:38] 4d8d923227d8: Download complete
[2022-12-30 21:04:38] 5834fb29a8c0: Verifying Checksum
[2022-12-30 21:04:38] 5834fb29a8c0: Download complete
[2022-12-30 21:04:41] 6e3729cf69e0: Verifying Checksum
[2022-12-30 21:04:41] 6e3729cf69e0: Download complete
[2022-12-30 21:04:42] 6e3729cf69e0: Pull complete
[2022-12-30 21:04:42] 4d8d923227d8: Pull complete
[2022-12-30 21:04:43] 5834fb29a8c0: Pull complete
[2022-12-30 21:04:43] 2dc10fb88481: Pull complete
[2022-12-30 21:04:43] Digest: sha256:19d077d343984437dc80c354bd0e53d2d65ca86e00694bddc444a87b64be3386
[2022-12-30 21:04:43] Status: Downloaded newer image for eclipse-temurin:17-jre
[2022-12-30 21:04:43] ---> 5e2265f6166a
[2022-12-30 21:04:43] Step 2/15 : WORKDIR application
[2022-12-30 21:04:43] ---> Running in 748178b1d5ce
[2022-12-30 21:04:43] Removing intermediate container 748178b1d5ce
[2022-12-30 21:04:43] ---> a2457740a589
[2022-12-30 21:04:43] Step 3/15 : ARG JAR_FILE=build/libs/halo-*.jar
[2022-12-30 21:04:43] ---> Running in 4989745de6b1
[2022-12-30 21:04:43] Removing intermediate container 4989745de6b1
[2022-12-30 21:04:43] ---> c0dddd47a74b
[2022-12-30 21:04:43] Step 4/15 : COPY ${JAR_FILE} application.jar
[2022-12-30 21:04:43] COPY failed: no source files were specified
[2022-12-30 21:04:43] [Pipeline] }
[2022-12-30 21:04:43] [Pipeline] // stage
[2022-12-30 21:04:43] [Pipeline] stage
[2022-12-30 21:04:43] [Pipeline] { (推送 Docker 镜像到 TCR)
[2022-12-30 21:04:43] Stage "推送 Docker 镜像到 TCR" skipped due to earlier failure(s)
[2022-12-30 21:04:43] [Pipeline] }
[2022-12-30 21:04:43] [Pipeline] // stage
[2022-12-30 21:04:43] [Pipeline] }
[2022-12-30 21:04:43] [Pipeline] // node
[2022-12-30 21:04:43] [Pipeline] End of Pipeline
[2022-12-30 21:04:43] ERROR: script returned exit code 1
[2022-12-30 21:04:43] Finished: FAILURE
***
-----------构建halo-001-----------
2022-12-30 21:04:24 create_build_image : succ,
ARG JAR_FILE=build/libs/halo-*.jar
COPY ${JAR_FILE} application.jar
问题是否出在Dockerfile中的这两行,我该如何解决,谢谢各位帮助。