[英]C# Late binding command COM obj commands fails due to desired copy back setting
[英]Docker Copy Command fails
我是 Docker 新手,同時運行 Docker 文件 ** 我的 Docker 文件 **
運行build -t myappfactory 時。 它的失敗。 我在 COPY 命令中嘗試了許多路徑組合,但沒有運氣。
** 我使用的是 Visual Studio 2017 並且也安裝了 Docker Tools ** 這是我的文件夾結構
docker build -t autofacinterface 。 . 每次說無法創建文件時,我都收到錯誤消息。 系統找不到指定的文件。
我正在使用 Cmd 從我當前工作的 .csproj 文件夾構建 docker。
{
D:\DineshVisualStudio\Autofac-
Interceptor\AutofacModule\Autofac.Interface.ConcatFactory>**docker build -t
autofacinterfaceconcatfactory .**
Sending build context to Docker daemon 4.608kB
Step 1/15 : FROM microsoft/dotnet:2.2.0-preview1-aspnetcore-runtime AS base
---> 2df5940c47f7
Step 2/15 : WORKDIR /app
---> Using cache
---> f4d2190d9b44
Step 3/15 : FROM microsoft/dotnet:2.2.100-preview1-sdk AS build
---> af242cb10bf0
Step 4/15 : WORKDIR /DineshVisualStudio/Autofac-
interceptor/AutofacModule/Autofac.interface.ConcactFactory
---> Using cache
---> dbf15787395b
Step 5/15 : COPY /Autofac.Interface.ConcatFactory.csproj project/
COPY failed: CreateFile \\?\C:\ProgramData\Docker\tmp\docker-
builder138146052\COPY: The system cannot find the file specified.
}
**after @Mike suggestion .Now I am getting an issue**
{ D:\DineshVisualStudio\Autofac-
Interceptor\AutofacModule\Autofac.Interface.ConcatFactory>docker build
-t myappfact .
Step 6/15 : WORKDIR /Autofac-interceptor/project
Step 7/15 : RUN dotnet restore
---> Running in 9e91df3e68a3
MSBUILD : error MSB1003: Specify a project or solution file. The current
working directory does not contain a project or solution file.
The command 'cmd /S /C dotnet restore' returned a non-zero code: 1
}
我認為您不需要COPY /Autofac.Interface.ConcatFactory.csproj
的前導/
。 源文件相對於當前工作目錄,您之前已經調用了WORKDIR
。
Step 5/15 : COPY COPY
您的 Dockerfile 中是否連續兩次出現COPY
一詞?
命令“ COPY /Autofac.Interface.ConcatFactory.csproj project/ ”失敗。 我建議您在此處閱讀有關命令 COPY 的更多信息。 如果您從文件夾“D:\\DineshVisualStudio\\Autofac-Interceptor\\AutofacModule\\Autofac.Interface.ConcatFactory”運行 docker build ,請使用命令“ COPY ..”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.