WindowsマシンにDockerをインストールしました。現在、Visual Studioの「Run with Docker」ボタンを使用してWebアプリケーションを実行できる場所にvsprojectを設定しています。ドッカーとNETCore 2.0、ドッカー画像を実行できません
しかし、私はPowerShellのに行くと
docker build -t blog .
出力使用して、自分のイメージを構築:私が使用しようとすると、しかし
PS C:\Users\Acina\sites\Blog> docker build -t blog .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\Users\Acina\sites\Blog
\Dockerfile: The system cannot find the file specified.
PS C:\Users\Acina\sites\Blog> cd Blog
PS C:\Users\Acina\sites\Blog\Blog> docker build -t blog .
Sending build context to Docker daemon 3.584kB
Step 1/6 : FROM microsoft/aspnetcore:2.0
---> 452ca00e5495
Step 2/6 : ARG source
---> Using cache
---> 73e5e625c084
Step 3/6 : WORKDIR /app
---> Using cache
---> 9cb30c8476e4
Step 4/6 : EXPOSE 80
---> Using cache
---> 6d1a8f3cc094
Step 5/6 : COPY ${source:-obj/Docker/empty} .
---> Using cache
---> aedf4f7d5b5d
Step 6/6 : ENTRYPOINT dotnet Blog.dll
---> Using cache
---> d3d785062d3f
Successfully built d3d785062d3f
Successfully tagged blog:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and director
ies added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions f
or sensitive files and directories.
PS C:\Users\Acina\sites\Blog\Blog>
を:docker run -p 5000:5000 blog
PS C:\Users\Acina\Documents\Visual Studio 2017\Projects\Blog\Blog> docker run -p 5000:5000 blog
[ERROR] docker : Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
[ERROR] At line:1 char:1
[ERROR] + docker run -p 5000:5000 blog
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : NotSpecified: (Did you mean to...tnet SDK from: :String) [], Remote
[ERROR] Exception
[ERROR] + FullyQualifiedErrorId : NativeCommandError
[ERROR]
[ERROR] http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
[ERROR]
から私がこれまでに研究してきたことは、ドッカーが私の.dllファイルを見つけることができないと思われます。えーここでデバッグ\ netcoreapp2.0 \ Blog.dll
\プロジェクト\ブログ\ブログ\ビンは、私は同じ問題を抱えていた私のDockerfile
FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/empty} .
ENTRYPOINT ["dotnet", "Blog.dll"]
タグは 'blog-site'、画像は' blog'ですか? 'docker build'の出力を追加して –
にビルド出力を追加しましたが、当面は一時的な回避策が見つかりました。私は自分のLinuxサーバーにリポジトリをクローンし、Blog/Blog内で 'dotnet run'を実行しました。私はローカルホストにトラフィックを転送するためにnginxを使用しています。 – jeninja