Windows(10)にdockerをインストールしましたが、新しいプロジェクトをビルドしようとすると、常に次のエラーが発生します。
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
Visual Studio 2017で作成したプロジェクトを確認すると、表示されません docker-compose ソリューションのセクション。 1つのプロジェクト(.Net core 2.0)と1つのDockerfileファイルが含まれています。
以下は私が従ったステップです。
ファイル->新しいプロジェクト-> Asp.NetコアWebアプリケーション-> API(Dockerサポートを有効にする)-> OK
これが私のプロジェクト構造の様子です(docker-composeセクションはありません)
私はここで何かが欠けていますか?
VS 2017の専門家ではありませんが、プロジェクト内にdocker-compose.yml
ファイルを作成する必要があります。
詳細については、 ここ を参照してください。
version: '3.5'
services:
client:
container_name: WebApplication
build:
dockerfile: Dockerfile
volumes:
# Any volumes you would mount goes here
ports:
# Ports that need to be mapped from container to Host goes here
environment:
# Any environment variables
編集:VS2017でdocker-compose.yml
を自動的に作成するには、プロジェクトを右クリックして、[追加]> [Orchestratorサポート]を選択する必要があります。 (15.8以降)または[追加]> [Dockerプロジェクトサポート](15.8未満)。