收藏
回答

云托管部署失败,.netcore6?

AppID
wx9826339395e855b8

[2024-05-06 17:09:19] Started by user coding

[2024-05-06 17:09:19] Running in Durability level: MAX_SURVIVABILITY

[2024-05-06 17:09:20] [Pipeline] Start of Pipeline

[2024-05-06 17:09:20] [Pipeline] node

[2024-05-06 17:09:20] Running on Jenkins in /root/workspace

[2024-05-06 17:09:20] [Pipeline] {

[2024-05-06 17:09:21] [Pipeline] stage

[2024-05-06 17:09:21] [Pipeline] { (检出 ZIP 包)

[2024-05-06 17:09:21] Stage "检出 ZIP 包" skipped due to when conditional

[2024-05-06 17:09:21] [Pipeline] }

[2024-05-06 17:09:21] [Pipeline] // stage

[2024-05-06 17:09:21] [Pipeline] stage

[2024-05-06 17:09:21] [Pipeline] { (检出代码仓库)

[2024-05-06 17:09:21] [Pipeline] sh

[2024-05-06 17:09:21] + git clone ****** .

[2024-05-06 17:09:21] Cloning into '.'...

[2024-05-06 17:09:28] [Pipeline] sh

[2024-05-06 17:09:28] + git checkout master

[2024-05-06 17:09:28] Already on 'master'

[2024-05-06 17:09:28] Your branch is up-to-date with 'origin/master'.

[2024-05-06 17:09:28] [Pipeline] }

[2024-05-06 17:09:29] [Pipeline] // stage

[2024-05-06 17:09:29] [Pipeline] stage

[2024-05-06 17:09:29] [Pipeline] { (构建 Docker 镜像)

[2024-05-06 17:09:29] [Pipeline] sh

[2024-05-06 17:09:29] + docker login -u ****** -p ******

ccr.ccs.tencentyun.com/tcb-******-ckun/ca-yomkpfjm_dotnet-u7ti:dotnet-u7ti-002-20240506170913

[2024-05-06 17:09:29] WARNING! Using --password via the CLI is insecure.

Use --password-stdin.

[2024-05-06 17:09:29] WARNING! Your password will be stored unencrypted

in /root/.docker/config.json.

[2024-05-06 17:09:29] Configure a credential helper to remove this

warning. See

[2024-05-06 17:09:29]

https://docs.docker.com/engine/reference/commandline/login/#credentials-store

[2024-05-06 17:09:29]

[2024-05-06 17:09:29] Login Succeeded

[2024-05-06 17:09:29] [Pipeline] sh

[2024-05-06 17:09:29] + docker build -f ././/Dockerfile -t

ccr.ccs.tencentyun.com/tcb-******-ckun/ca-yomkpfjm_dotnet-u7ti:dotnet-u7ti-002-20240506170913

./

[2024-05-06 17:09:29] DEPRECATED: The legacy builder is deprecated and

will be removed in a future release.

[2024-05-06 17:09:29] Install the buildx component to build

images with BuildKit:

[2024-05-06 17:09:29] https://docs.docker.com/go/buildx/

[2024-05-06 17:09:29]

[2024-05-06 17:09:30] Sending build context to Docker daemon 195.4MB


[2024-05-06 17:09:30] Step 1/15 : FROM

mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build

[2024-05-06 17:09:31] 6.0-alpine: Pulling from dotnet/sdk

[2024-05-06 17:09:32] 619be1103602: Pulling fs layer

[2024-05-06 17:09:32] 49c78dc87bac: Pulling fs layer

[2024-05-06 17:09:32] b1217d23467d: Pulling fs layer

[2024-05-06 17:09:32] b27277ae2b4a: Pulling fs layer

[2024-05-06 17:09:32] a00481cbf2a0: Pulling fs layer

[2024-05-06 17:09:32] 69eb4d60fc6d: Pulling fs layer

[2024-05-06 17:09:32] e8900b8e284d: Pulling fs layer

[2024-05-06 17:09:32] 49c78dc87bac: Verifying Checksum

[2024-05-06 17:09:32] 49c78dc87bac: Download complete

[2024-05-06 17:09:32] 619be1103602: Verifying Checksum

[2024-05-06 17:09:32] 619be1103602: Download complete

[2024-05-06 17:09:32] 619be1103602: Pull complete

[2024-05-06 17:09:33] b27277ae2b4a: Verifying Checksum

[2024-05-06 17:09:33] b27277ae2b4a: Download complete

[2024-05-06 17:09:33] 49c78dc87bac: Pull complete

[2024-05-06 17:09:33] e8900b8e284d: Verifying Checksum

[2024-05-06 17:09:33] e8900b8e284d: Download complete

[2024-05-06 17:09:35] a00481cbf2a0: Verifying Checksum

[2024-05-06 17:09:35] a00481cbf2a0: Download complete

[2024-05-06 17:09:37] b1217d23467d: Verifying Checksum

[2024-05-06 17:09:37] b1217d23467d: Download complete

[2024-05-06 17:09:38] b1217d23467d: Pull complete

[2024-05-06 17:09:38] b27277ae2b4a: Pull complete

[2024-05-06 17:09:38] a00481cbf2a0: Pull complete

[2024-05-06 17:10:05] 69eb4d60fc6d: Verifying Checksum

[2024-05-06 17:10:05] 69eb4d60fc6d: Download complete

[2024-05-06 17:10:06] 69eb4d60fc6d: Pull complete

[2024-05-06 17:10:06] e8900b8e284d: Pull complete

[2024-05-06 17:10:06] Digest:

sha256:f09dc36e5f4ed0c31690e98ee5226737544bba6690fe1040cfea52c4f9573dcd

[2024-05-06 17:10:06] Status: Downloaded newer image for

mcr.microsoft.com/dotnet/sdk:6.0-alpine

[2024-05-06 17:10:06] ---> f766f08db8b2

[2024-05-06 17:10:06] Step 2/15 : RUN sed -i

's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories

[2024-05-06 17:10:06] ---> Running in 89d69def2bc7

[2024-05-06 17:10:07] Removing intermediate container 89d69def2bc7

[2024-05-06 17:10:07] ---> 0f7419da8e9c

[2024-05-06 17:10:07] Step 3/15 : WORKDIR /source

[2024-05-06 17:10:07] ---> Running in b78f857dcb28

[2024-05-06 17:10:07] Removing intermediate container b78f857dcb28

[2024-05-06 17:10:07] ---> 5abc4da20dd8

[2024-05-06 17:10:07] Step 4/15 : COPY *.sln .

[2024-05-06 17:10:07] ---> 40e7eae35641

[2024-05-06 17:10:07] Step 5/15 : COPY aspnetapp/*.csproj ./aspnetapp/

[2024-05-06 17:10:07] ---> dcf39395f51a

[2024-05-06 17:10:07] Step 6/15 : RUN dotnet restore -r linux-musl-x64

/p:PublishReadyToRun=true

[2024-05-06 17:10:07] ---> Running in f2d4e31000b4

[2024-05-06 17:10:08] Determining projects to restore...

[2024-05-06 17:10:26] Restored /source/aspnetapp/aspnetapp.csproj (in

16.8 sec).

[2024-05-06 17:10:38] Removing intermediate container f2d4e31000b4

[2024-05-06 17:10:38] ---> 534703d740cb

[2024-05-06 17:10:38] Step 7/15 : COPY aspnetapp/. ./aspnetapp/

[2024-05-06 17:10:38] ---> f2cad09d770d

[2024-05-06 17:10:38] Step 8/15 : WORKDIR /source/aspnetapp

[2024-05-06 17:10:38] ---> Running in 0bc547805c41

[2024-05-06 17:10:39] Removing intermediate container 0bc547805c41

[2024-05-06 17:10:39] ---> d05be36cf4d3

[2024-05-06 17:10:39] Step 9/15 : RUN dotnet publish -c release -o /app

-r linux-musl-x64 --self-contained true --no-restore

/p:PublishTrimmed=true /p:PublishReadyToRun=true

/p:PublishSingleFile=true

[2024-05-06 17:10:39] ---> Running in 0dc57ddd68c6

[2024-05-06 17:10:39] MSBuild version 17.3.2+561848881 for .NET

[2024-05-06 17:10:40]

/usr/share/dotnet/sdk/6.0.421/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(267,5):

error NETSDK1047: Assets file

'/source/aspnetapp/obj/project.assets.json' doesn't have a target for

'net6.0/linux-musl-x64'. Ensure that restore has run and that you have

included 'net6.0' in the TargetFrameworks for your project. You may also

need to include 'linux-musl-x64' in your project's RuntimeIdentifiers.

[/source/aspnetapp/aspnetapp.csproj]

[2024-05-06 17:10:40] The command '/bin/sh -c dotnet publish -c release

-o /app -r linux-musl-x64 --self-contained true --no-restore

/p:PublishTrimmed=true /p:PublishReadyToRun=true

/p:PublishSingleFile=true' returned a non-zero code: 1

[2024-05-06 17:10:40] [Pipeline] }

[2024-05-06 17:10:40] [Pipeline] // stage

[2024-05-06 17:10:40] [Pipeline] stage

[2024-05-06 17:10:40] [Pipeline] { (推送 Docker 镜像到 TCR)

[2024-05-06 17:10:40] Stage "推送 Docker 镜像到 TCR" skipped due to earlier

failure(s)

[2024-05-06 17:10:40] [Pipeline] }

[2024-05-06 17:10:40] [Pipeline] // stage

[2024-05-06 17:10:40] [Pipeline] }

[2024-05-06 17:10:40] [Pipeline] // node

[2024-05-06 17:10:40] [Pipeline] End of Pipeline

[2024-05-06 17:10:40] ERROR: script returned exit code 1

[2024-05-06 17:10:40] Finished: FAILURE

***

-----------构建dotnet-u7ti-002-----------

2024-05-06 17:09:18 create_build_image : succ,

最后一次编辑于  05-06
回答关注问题邀请回答
收藏

1 个回答

  • Alfred Huang
    Alfred Huang
    05-07

    [2024-05-06 17:10:40] The command '/bin/sh -c dotnet publish -c release

    -o /app -r linux-musl-x64 --self-contained true --no-restore

    /p:PublishTrimmed=true /p:PublishReadyToRun=true

    /p:PublishSingleFile=true' returned a non-zero code: 1


    dockerfile里面的这个命令执行失败,镜像构建失败

    05-07
    有用
    回复
登录 后发表内容