I am new to docker. I have VS 2017 community edition installed on my machine.
I have installed
Docker for windows
Docker tools for windows.
I created a new ASP Dot net core 2.0 Web API project with 'Enable Docker Support' option enabled.
I was able to build default project but when I start debugging it gave me below error. I can see new image is created using 'docker image list -a' command but VS is unable to start container.
Severity Code Description Project File Line Suppression State
Error Building webapplication9
Creating dockercompose4820272847090409016_webapplication9_1 ...
[1A[2K
Creating dockercompose4820272847090409016_webapplication9_1 ... [31merror[0m
[1B
ERROR: for dockercompose4820272847090409016_webapplication9_1 Cannot start service webapplication9: container be38d8f606526b8957cbce69c30a9cc329ee79e53f6b216e66d0cdc5895f4a14 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"powershell -Command [System.Threading.Thread]::Sleep([System.Threading.Timeout]::Infinite)","User":"ContainerUser","WorkingDirectory":"C:\\app","Environment":{"ASPNETCORE_ENVIRONMENT":"Development","ASPNETCORE_PKG_VERSION":"2.0.3","ASPNETCORE_URLS":"http://+:80","DOTNET_USE_POLLING_FILE_WATCHER":"1","NUGET_FALLBACK_PACKAGES":"c:\\.nuget\\fallbackpackages","NUGET_PACKAGES":"C:\\.nuget\\packages"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
ERROR: for webapplication9 Cannot start service webapplication9: container be38d8f606526b8957cbce69c30a9cc329ee79e53f6b216e66d0cdc5895f4a14 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"powershell -Command [System.Threading.Thread]::Sleep([System.Threading.Timeout]::Infinite)","User":"ContainerUser","WorkingDirectory":"C:\\app","Environment":{"ASPNETCORE_ENVIRONMENT":"Development","ASPNETCORE_PKG_VERSION":"2.0.3","ASPNETCORE_URLS":"http://+:80","DOTNET_USE_POLLING_FILE_WATCHER":"1","NUGET_FALLBACK_PACKAGES":"c:\\.nuget\\fallbackpackages","NUGET_PACKAGES":"C:\\.nuget\\packages"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
Encountered errors while bringing up the project..
For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets 346
Am I missing any pre-requisite ?
Related
I've a solution with 2 WEB API items and both have docker support so i can debug them in docker.
I've also had the dockercompose so i could test them like the compose in the running environment. However after a problem with docker desktop and did a reinstall of docker desktop i can't have VS2022 working with docker compose again.
below a part of the log file of visual studio when i load my solution
SetSite failed for package [DockerComposePackage]Source: 'System.ComponentModel.Composition' Description: Cannot cast the underlying exported value of type 'Docker.Compose' to type 'Microsoft.VisualStudio.Containers.Tools.Common.Commands.ICommandManager'.
I'm trying to attach a remote docker container from Visual Studio 2022, and I'm getting this error. The error says it is permission related but I can run that command via the terminal.
I guess Visual Studio tries to run that command with a different user.
Visual Studio runs on Windows 10
Docker container runs on Ubuntu (Azure VM)
I can be able to see running images on Linux from Visual Studio which means that I correctly set the configuration.
The error is;
Failed to launch debug adapter 'coreclr'.
Unable to find debugger script at '/home/devadmin/.vs-debugger'.
Initialization log:
Determining user folder on remote system...
Checking for existing installation of debugging tools...
Downloading debugger launcher...
Creating debugger installation folder: /home/devadmin/.vs-debugger
Failed: "Command 'mkdir -p '/home/devadmin/.vs-debugger'' failed with code '1'. "
Unable to find debugger script at '/home/devadmin/.vs-debugger'.
Failed: Unable to find debugger script at '/home/devadmin/.vs-debugger'.
The program '[1] CoreServer' has exited with code 4294967295 (0xffffffff).
I tried to attach remote Docker (Linux) process from Windows machine, and I got an error.
I have docker installed.
I navigate to my project on git bash (windows) and type docker build .
and following error occurs:
error during connect: This error may indicate that the docker daemon is not running. open //./pipe/docker_engine: The specified file could not be found.
So I did some reaseach, did all steps from Windows Manual installation steps for older versions of WSL(https://learn.microsoft.com/en-us/windows/wsl/install-manual) but it seems like I have already met all of requirements
and the problem still occurs.
VSCode Extension IBM Blockchain platfrom , While running the fabric getting this error in Windows:
Error: No such container:
fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:43 PM]
[INFO] Error: No such container:
fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:43 PM]
[INFO] Error: No such container:
fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:44 PM]
[ERROR] Failed to start Local Fabric: Error: Failed to execute command
"cmd" with arguments "/c, start.cmd" return code 1
prerequisites
ensure you have all the correct versions of required software mentioned in the plugin
I had this same problem on Windows 10. Here is how I solved it.
Setup docker and make sure you can run the hello world program
Setup the shared drive with a user with admin authority (I named it
DockerHost) in the Docker Desktop. I could not use my id I log in
with it is Azure and uses a pin or fingerprint.
Ensure the shared drive for docker is accessible to admins or uses who will run docker
Modify the permissions to the folder and all sub directories on C:\Program Files\Docker . I added the user DockerHost and ensured it had all privileges
Uninstall the extension in VSCode
Remove all blockchain extensions under the folder ~/.vscode/extenstions
e.g. ibmblockchain.ibm-blockchain-platform*
remove the folder ~/.fabric-vscode reinstall the extension in VSCode
Run it to test (worked for me)
While trying to figure this out I did a few steps
1). try to run the start.cmd directly from a command prompt saw error
2). try to run the start.cmd from a powershell with admin privileges, saw it worked
3). Beat my head a bit
In my case the problem, could have been solved most likely by just adding and giving all privileges to the user DockerHost and Administrators group to the folder C:\Program Files\Docker and it's sub directories
I ran across same issues on Windows 10, VS Code with IBM Blockchain platform extension. I am new to blockchain and I was following the documentation.
This is how I resolved it:
Error: [INFO] Error: No such container: fabricvscodelocalfabric_peer0.org1.example.com
Under Docker settings I shared my C drive and give Administrator password.
Started Docker as a regular windows user. I got below error:
Error: [INFO] Error response from daemon: Container 0d60c15fb27a2722742402df2b4c40e88a4506ec7e2b37d917da13e10cc09822 is not running
This time restarted windows, and started Docker as an Administrator. I was able to finally start my local fabric successfully:
[SUCCESS] Connected to Local Fabric
Hope this helps someone.
Go to C:\Program Files\Docker, right-click the docker folder, go to permissions, security, Change permissions to full control and click okay and apply. This will allow the fabric environment to run in visual studio code
I am working on a windows 10 home so I have a docker toolbox and am using an IBM cloud app service : python-django app. I followed all the instructions given here:
https://console.bluemix.net/docs/apps/tutorials/tutorial_web.html#before-you-begin
I then open it in Pycharm (community edn) and try to build it locally by doing the following :
1)Import the settings.jar file (Given in the developer tools)
2)Tools > IBM Cloud Developer Tools > Build app in release mode
But I get the following error :
Creating image latestpy-django-tools based on Dockerfile-tools...
Building...
OK
Creating a container named 'latestpy-django-tools' from that image...
FAILED
An error Error response from daemon: invalid mode: /app was encountered while creating Docker container 'latestpy-django-tools'.
Please help!!
Kiera.k, on your Win10 system do you have Docker Toolbox or Docker for Windows? IBM Cloud Developer Tools requires Docker for Windows and will not work with Docker Toolbox.
Also, running build with the additional --trace parameter might provide some more details, if you have not already been using that. If you are using Docker for Windows, seeing all the output you get with --trace would be great.