I have installed docker engine on a Linux server. On my desktop's Visual Studio 2015, I created an asp.net application. Now I want to publish it to the Linux server and create a docker image.
I followed this step.
I don't have an azure account and I want to use my own Linux server. So next, I clicked the Docker Containers. The interface became:
Then I clicked Custom Docker Host and pressed OK button.
The interface was
Now I input the image name as DockerDemo. Also I type the server url something like tcp://12.16.45.56:8080. Validate connection is okay then go to the next step.
Finally I get this:
However I get an error during publish.
Severity Code Description Project File Line Suppression State
Error An error occured during publish.
The command [docker -H tcp://12.16.45.56:8080 build -t DockerDemo -f "C:\Users\me\AppData\Local\Temp\PublishTemp\DockerDemo63\approot\src\DockerDemo\Dockerfile" "C:\Users\me\AppData\Local\Temp\PublishTemp\DockerDemo63"] exited with code 1: 'docker' is not recognized as an internal or external command,
operable program or batch file.
Please visit http://go.microsoft.com/fwlink/?LinkID=529706 for troubleshooting guide. DockerDemo 0
By the way, the framework I am using is:
"frameworks": {
"dnx451": { },
"dnxcore50": { }
}
Thanks for help!
Visual Studio can't find the docker command on your local computer. It needs this as a client to connect to the docker daemon on your Linux server. The easiest way to do this is to install Docker Toolbox from here:
https://www.docker.com/products/docker-toolbox
You may have to uninstall and re-install "Visual Studio 2015 Tools for Docker" or manually add to Powershell's $env:Path if the docker command still can't be found.
Also, your Image Name must not contain uppercase characters. Use dockerdemo rather than DockerDemo.
Related
I am attempting to remotely debug a .NetCore application in Ubuntu Linux from Visual Studio 2019 in Windows 10. I can see the remote ipaddress (ping thru command line). I can RDT to the ipaddress. I can successfully transfer files to it via WinSCP.
I created a simple .NetCore "HelloWorld" app and copied onto the Linux VM.
I used the following commands to build and publish:
dotnet build -r linux-x64
dotnet publish --self-contained -r linux-x64
I ran the following command on the Linux VM to ensure that ssh is functional:
sudo apt-get install openssh-server unzip curl
The app is running on Linux.
From VS I try to attach to the process:
I get prompted for logon:
I get the following error:
Is there a step I'm missing somewhere?
Is there a configuration/permissions issue I am unaware of?
Thanks, JohnB
Microsoft has documented debugging a Linux target from a Windows development machine at https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh?view=vs-2022
Unfortunately, using that method, you will need to manually deploy and manually attach the debugger. If you'd like Microsoft to change that, then it would be wise to upvote this issue: https://developercommunity.visualstudio.com/t/Convenient-way-to-add-a-remote-debug-con/917516
A 3rd party developer has created a Visual Studio extension that provides this missing feature to Visual Studio. It can be downloaded from https://github.com/radutomy/VSRemoteDebugger
I had the same problem initially because I didn't enter the connection target in the first screen.
After having entered the correct target myusername#192.168.178.95 in the first screen the second screen did not show up any longer and I got the expected list of processes
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker ...
Try running Visual Studio as admin. Also check if your daemon is running and ready. If you are using docker for windows, and not only the binaries, then there should be a docker icon on the task bar. Also try to give more context in your question, exactly when did this happen?
enter image description hereI've just installed Docker for Windows on latest Windows 10 Pro. Docker starts and passes the install tests eg docker run hello-world. However, i am unable to successfully download and run the Microsoft DocumentDB emulator. I've followed the instructions:
"Once you have Docker for Windows installed, you can pull the Emulator image from Docker Hub by running the following command from your favorite shell (cmd.exe, PowerShell, etc.)"
docker pull microsoft/azure-documentdb-emulator
From screenshot you can see that the container downloading fails with an "unknown blob" error. Any ideas on how to fix this?
Thanks.
When you run "docker version" in cmd.exe, is the server version Linux/amd64? If so, you need to switch so that the server OS is Windows. To do that, go to the taskbar and right click the docker whale icon, and then click "Switch to Windows containers". You'll then have to restart your machine.
I installed apigee-127 in a Docker-Container on my Local machine.
After that I run this Docker-Container and created a project with
a127 project create hello-world
To start this project
a127 project start
The Respone from this is that the Project ist started und u can enter it in your browser with your localhost and the Port thats given or in the same Docker-Container with the curl command
docker: curl http://127.0.0.1:10010/hello?name=Scott
browser: http://localhost:32768/hello?name=Scott
Most a127 commands seem to work fine. Now I would like to use the swagger-editor to edit my project, but there doesn't seem to be an option to edit the project remotely on my Docker-Container without an browser.
a127 project edit
The Answer is:
Starting Swagger editor.
Opening browser to: http://localhost:36070/#/edit
{ [Error: Command failed: xdg-open: no method available for opening 'http://localhost:36070/#/edit'
] killed: false, code: 3, signal: null }
My first issue is that i have no chance to start a browser inside my Docker-Container -> its a webserver without GUI or Browser.
I wanted to start my swagger-editor outside the Container on my local machine but I had no idea to get into it.
Maybe someone can help me to get done with this problem?
I'm not using a127, but swagger project edit --help command output this.
-s do not open the browser
# swagger project edit --help
Usage: edit [options] [directory]
open Swagger editor for this project or the specified project directory
Options:
-h, --help output usage information
-s, --silent do not open the browser
--host the hostname the editor is served from
-p, --port the port the editor is served from
I'm trying to execute a web deploy script on a clean build Windows Server 2008 R2 machine and getting the following error:
ERROR: The system was unable to find the specified registry key or
value. msdeploy.exe is not found on
this machine. Please install Web
Deploy before execute the script.
The package was created in VS2010 and executes fine on my development box (as always!). If I import the package on the server through IIS everything works fine.
Web Deploy has been installed on the server through the Web Deployment Tool 2.1 via the Web P.I and I've verified the inclusion of msdeploy.exe. I'm running the script through the "IIS Extensions/Web Deploy Command Line" start menu item so I'm guessing that the correct paths should be set. I've also tried it as Administrator with the same error.
Any help greatly appreciated.
Copied from here:
There is an error with the way Microsoft’s Web Deploy 2.1 application creates command line packages from Visual Studio 2010.
If you create a package to publish and then try to run the msdeploy.exe command line publishing tool it on a production server running IIS then you may receive the following error:
ERROR: The system was unable to find the specified registry key or
value. msdeploy.exe is not found on this machine. Please install Web
Deploy before execute the script.
Assuming that you actually have installed Web Deploy from http://www.iis.net/download/WebDeploy then the error may be caused by an incorrect registry path variable in the .cmd file that Visual Studio creates.
Open up the .deploy.cmd file that is part of your deployment package in a text editor and look for the following code block:
if "%MSDeployPath%" == "" (
for /F "usebackq tokens=2*" %%i in
(`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1" /v InstallPath`)
do (if "%%~dpj" == "%%j" (
set MSDeployPath=%%j
If you have installed Web Deploy 2.0 or higher, then the error is caused by the registry query to HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1. If you open up regedit on your production server you’ll find that the appropriate key is actually HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2.
Change the reference in the.deploy.cmd file and you’ll be able to successfully run the deployment package.
I have the same problem. Installed WebDeploy_2_10_amd64_en-US. Running the Deploy Command Line I get the same erorr. However, in IIS (version 7) I could use an option import application. With this option (right side of the window in the actions toolbar) I was able to import the application deployment package zip file. All settings were imported correctly except for the application pool. I only had to adjust that and everything was running fine.