2017-05-14 18 views
1

私はDocker for WindowsでCosmos DB Emulatorを稼働させようとしていますが、運が上がらないのです。私はここでコマンドを次のようしています:Docker for WindowsでCosmos DBエミュレータを実行するにはどうすればよいですか?

https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator

具体的に:

md %LOCALAPPDATA%\DocumentDBEmulatorCert 2>nul 
docker run -v %LOCALAPPDATA%\DocumentDBEmulatorCert:c:\DocumentDBEmulator\DocumentDBEmulatorCert -P -t -i mominag/documentdb_emulator 

は、私が "無効なバインドマウント" を含むドッカーから様々なエラーを取得しています。コマンドそのものが正しいように見えないので、私はmominag/documentdb_emulatormicrosoft/azure-documentdb-emulatorに変更しようとしましたが、それはうまくいきません。 これはDockerを初めて使用しようとする試みではありません。

また、Microsoftのドキュメントのコマンドのソースのように見えるGitHubで次のことを見てきました。

https://github.com/Azure/azure-documentdb-emulator-docker

UPDATE: ここでは、私が実行しているコマンドと返されるエラーです。私は2>nulを削除した場合

PS C:\> md %LOCALAPPDATA%\DocumentDBEmulatorCert 2>nul 
out-file : FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', 
call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr. 
At line:1 char:1 
+ md %LOCALAPPDATA%\DocumentDBEmulatorCert 2>nul 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : OpenError: (:) [Out-File], NotSupportedException 
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand 

PS C:\> docker run -v %LOCALAPPDATA%\DocumentDBEmulatorCert:c:\DocumentDBEmulator\DocumentDBEmulatorCert -P -t -i docume 
ntdb_emulator 
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid bind mount spec "%LOCALAPPD 
ATA%\\DocumentDBEmulatorCert:c:\\DocumentDBEmulator\\DocumentDBEmulatorCert": invalid volume specification: '%LOCALAPPDA 
TA%\DocumentDBEmulatorCert:c:\DocumentDBEmulator\DocumentDBEmulatorCert'. 
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'. 
PS C:\> 

は、ディレクトリが作成されますが、私はまだドッキングウィンドウrunコマンドで同じエラーを取得します。

+2

私はそれをやっただけで、うまくいきました。元のコマンドと 'microsoft/azure-documentdb-emulator'の両方がうまくいきました。ドッカーをWindowsの\ containerに切り替えましたか? – 4c74356b41

+0

私は窓のコンテナに切り替わっていないが、私はやったと私はまだエラーが発生しています。特定のエラーメッセージで質問を更新します。 – user1843640

+0

私はすべての仮想ネットワークを削除し、最初からドッカーをインストールすることをお勧めします。 – 4c74356b41

答えて

2

はあなたの説明によると、私は、私は次のようにディレクトリが正しく作成されていない見つけ、パワーシェル経由でコマンドラインをチェックしています

enter image description here

注:あなたが$env:LOCALAPPDATA%LOCALAPPDATA%を置き換えることができます。

documentdbエミュレータを起動するには、次のコマンドラインを実行している場合:

docker run -v %LOCALAPPDATA%\DocumentDBEmulatorCert:c:\DocumentDBEmulator\DocumentDBEmulatorCert -P -t -i mominag/documentdb_emulator 

私は次のようなエラーが発生しました:私はmicrosoft/azure-documentdb-emulatormominag/documentdb_emulatorを変更する場合

enter image description here

を、その後、私は私のを開始することができdocumentdbエミュレータは次のように正常に実行されます。

enter image description here

+0

%LOCALAPPDATA%を$ env:LOCALAPPDATAに置き換えると、ディレクトリを作成して "docker run"を実行するとそのトリックが実行されました。ありがとう。 – user1843640

関連する問題