首页 新闻 会员 周边 捐助

centos docker下发布exceptionless失败

0
悬赏园豆:5 [已解决问题] 解决于 2020-05-09 17:40
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.101 AS build
WORKDIR /app

COPY ./*.sln ./NuGet.Config ./
COPY ./build/*.props ./build/

# Copy the main source project files
COPY src/*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p src/${file%.*}/ && mv $file src/${file%.*}/; done

# Copy the test project files
COPY tests/*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p tests/${file%.*}/ && mv $file tests/${file%.*}/; done

RUN dotnet restore

# Copy everything else and build app
COPY . .
RUN dotnet build -c Release

# testrunner

FROM build AS testrunner
WORKDIR /app/tests/Exceptionless.Tests
ENTRYPOINT dotnet test --results-directory /app/artifacts --logger:trx

# job-publish

FROM build AS job-publish
WORKDIR /app/src/Exceptionless.Job

RUN dotnet publish -c Release -o out

# job

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS job
WORKDIR /app
COPY --from=job-publish /app/src/Exceptionless.Job/out ./
ENTRYPOINT [ "dotnet", "Exceptionless.Job.dll" ]

# api-publish

FROM build AS api-publish
WORKDIR /app/src/Exceptionless.Web

RUN dotnet publish -c Release -o out

# api

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS api
WORKDIR /app
COPY --from=api-publish /app/src/Exceptionless.Web/out ./
ENTRYPOINT [ "dotnet", "Exceptionless.Web.dll" ]


使用exceptionless自带的dockerfile发布
提示:
/usr/share/dotnet/sdk/3.1.101/NuGet.targets(123,5): error : Resource temporarily unavailable [/app/Exceptionless.sln]
ERROR: Service 'api' failed to build: The command '/bin/sh -c dotnet restore' returned a non-zero code: 1
以下是文件夹

初夏的阳光丶的主页 初夏的阳光丶 | 小虾三级 | 园豆:641
提问于:2020-05-07 20:20
< >
分享
最佳答案
0

exceltionless如果使用6.0版本 建议直接使用官方docker镜像

初夏的阳光丶 | 小虾三级 |园豆:641 | 2020-05-09 17:40
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册