How visual studio 2017 publishes dotnet core to docker
Needless to say, docker has many advantages that can be moved《Getting started with docker》, as an old bird in. Net, I also want to catch the last bus of docker early to reduce all kinds of holes in deployment. The following steps are for me to fully run after the official release of visual studio 2017 (in fact, vs2015 is also possible).
Step 1:Install docker
Download address: www.docker.com/docker-windows At the same time of downloading, first enable “Hyper-V” in “control panel” and “program”. After enabling, the download is basically completed. When the download is completed, restart the computer, and then start installing docker, which is basically “next”.
Step 2:Prepare docker
LAN compatriots need a ladder. I use SS. Fill in your agent in “Settings” – > “proxies” of docker. Mine is“ 127.0.0.1:1080 ”。 If there is no ladder, use the domestic image, and fill in the image address in “Settings” – > “daemon”: f2d6cb40.m.daocloud.io (I haven’t tested the image. I use a ladder. It is also said on the Internet that the agent configured in this way can’t be used. I don’t know if it’s because his SS doesn’t enable “allow links from the LAN”. My configuration can be used after it is configured.). Then enable disk sharing. “Settings” – > “shared drives” must enable Disk C (to be exact, the system disk), and then the disk where the project is enabled. All operations are shown in the figure:
Step 3:Open vs2017 and create a dotnetcore web project. Note that docker support is enabled. Of course, if you don’t have a choice, you can also right-click add – docker support in the solution explorer project. (the necessary files of docker are in the red box). At this time, F5 can run in the mode of docker.
Operation effect: you can see it in docker – “kitematic”. Of course, the host browser will also see it.
OK, there will be more than n pits without a ladder, and the prompt is very strange!
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support developpaer.
Read more here: Source link