-
Notifications
You must be signed in to change notification settings - Fork 6k
Update VS Tools for Docker topic #7214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- **aspnet-docker/Dockerfile.** Example Powershell commands to run from dockerfiles to include Windows features. | ||
[*https://github.com/Microsoft/aspnet-docker/blob/master/4.6.2/Dockerfile*](https://github.com/Microsoft/aspnet-docker/blob/master/4.6.2/Dockerfile) | ||
- Example Powershell commands to run from dockerfiles to include Windows features - | ||
[aspnet-docker/Dockerfile](https://github.com/Microsoft/aspnet-docker/blob/master/4.6.2/Dockerfile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some things that are special about the e-books @gewarren. like in this case because the content is also printed in a book, some urls are displayed in full in the additional resources list so I wouldn't standardize links for this set of content
|
||
With the latest versions of Docker for Windows, it is easier than ever to develop Docker applications because the setup is straightforward, as explained in the following references. | ||
With the latest versions of [Docker for Windows](https://docs.docker.com/docker-for-windows/), it is easier than ever to develop Docker applications because the setup is straightforward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it is -> it's
The URL needs to show up in the text for print.
Okay. How do I know if a topic is part of an e-book? |
I think it is good, but in addition to those changes, I think we could eliminate all the content and references to VS 2015. That content was created when VS 2017 was being released, but it is now late 2018, so I think we should get rid of the content mentioning VS 2015 because especially when targeting Docker, VS 2015 is really out of the game.. No one uses VS 2015 for Docker development. Many things won't work properly. |
First, that's the only place that will have these different links. |
I am OOF next week but this is ready to go from my POV. |
@lisaguthrie do you wanna review this PR and make sure the topic looks good to you? |
Removal of the 2015 references is good, but the remaining text still isn't accurate for VS 15.8+. With that version, "Add Docker Support" (or selecting the "Enable Docker Support" checkbox when creating a new project) ONLY adds a Dockerfile. All the docker-compose stuff is not there. The easiest way to add docker-compose stuff is to select Add Container Orchestration Support (on the same menu as Add Docker Support) on a new or existing project. You can also do Enable Docker Support on a new project and then do Add Container Orchestration Support, but Add Container Orchestration Support will also add a Dockerfile. |
@ghogen Can you take a look at the visual-studio-tools-for-docker.md changes? |
|
||
Docker support is included in Visual Studio 2017. Download Visual Studio 2017 here: [https://aka.ms/vsdownload?utm_source=mscom&utm_campaign=msdocs](https://aka.ms/vsdownload?utm_source=mscom&utm_campaign=msdocs) | ||
|
||
## Use Docker Tools in Visual Studio 2017 | ||
|
||
When you add Docker support to a service project in your solution, Visual Studio doesn't just add a DockerFile file to your project, it also adds a service section in your solution's *docker-compose.yml* files (or creates the files if they didn't exist). It's an easy way to begin composing your multicontainer solution. You can then open the *docker-compose.yml* files and update them with additional features. | ||
When you add Docker support to a web app project, Visual Studio adds a DockerFile file to the project. When you add container orchestrator support, Visual Studio not only adds a DockerFile to the project, but also a global docker-compose.yml file at the solution level. If *docker-compose.yml* already exists, Visual Studio adds the required lines of configuration code to it. It's an easy way to begin composing your multicontainer solution. You can then open the *docker-compose.yml* file and update it with additional features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add * around docker-compose.yml here and in a few other places.
--- | ||
# Use Visual Studio Tools for Docker (Visual Studio on Windows) | ||
|
||
The developer workflow when using Visual Studio Tools for Docker is similar to the workflow when using Visual Studio Code and Docker CLI (it is based on the same Docker CLI). Visual Studio Tools for Docker makes it even easier to get started, simplifies the process, and provides greater productivity for the build, run, and compose tasks. It's also able to execute and debug your containers via simple actions like **F5** and **Ctrl**+**F5**. You can also run and debug a group of containers (a whole solution) at the same time if they're defined in the same *docker-compose.yml* file at the solution level. | ||
The Visual Studio Tools for Docker developer workflow is similar to using Visual Studio Code and Docker CLI (it is based on the same Docker CLI). Visual Studio Tools for Docker makes it even easier to get started, simplifies the process, and provides greater productivity for the build, run, and compose tasks. Execute and debug your containers via simple actions like **F5** and **Ctrl**+**F5**. You can also run and debug a group of containers (a whole solution) at the same time if they're defined in the same *docker-compose.yml* file at the solution level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the last sentence here about docker-compose.yml should be removed or put into a separate paragraph that deals specifically with the less-common "Container Orchestratration" option. It's confusing to see it mentioned here for users that don't choose that more complex option.
…sual-studio-tools-for-docker
@lisaguthrie @CESARDELATORRE I think this is good to go now. Can you give it a final look? |
Looking good! One thing, which I'm not sure we want to get into in a lot of depth, is that all of this applies to .NET Core apps. Full framework apps still use the docker-compose approach; there's no option to have just a Dockerfile. Perhaps just put a note at the top of both articles indicating that .NET Framework web apps will use docker-compose? In the first article, if you do add container orchestration support and you already have a Dockerfile, we won't overwrite it. It only creates a Dockerfile if one is not available already. In the second article, step 5 option A "running a single app Docker container," you can do this from VS as well: If you haven't added container orchestration support, an F5 will run the container locally using docker run. |
@lisaguthrie So to clarify, in .NET Framework web apps, you can only add container orchestrator support. In .NET Core web apps, you can either add Docker support (Dockerfile) or container orchestrator support. Prior to version 15.8, there was no option to just add a Dockerfile in a .NET Core web app. Is that correct? |
@ghogen I think you are looking at an old diff. Can you refresh? |
@gewarren I'm not sure that the Full Framework scenario, I'm trying to verify that on a recent build. It's not clear to me yet whether there's an "Add Docker support" that adds docker-compose stuff, or whether it's just the Add Container Orchestration. I think it would be the former, but this version of the doc seems to be saying it's the latter. |
@gewarren ok checked a build and confirmed that your version in this doc is correct, thanks. I used a .NET 4.7.2 Web Application MVC project. The option on the New Project dialog was "Enable Docker Compose Support" and the Add menu has "Container Orchestration Support" as an option, but not "Docker support". |
@ghogen Thanks for reviewing! |
@lisaguthrie Do you want to give this a final review? At this point it's just stagnating here so would be great to get it merged. |
@gewarren thanks for the ping! It looks good :) |
@ghogen I'm not sure what to do with the VS tools for Docker topic in this PR. It looks like you already updated it :( Should I just remove the topic from this PR? |
@gewarren Your changes have been reviewed by PMs and approved, so let's go with those. I can then integrate any of mine on top of that. |
@mairaw Can you sign off on this so I can merge it? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gewarren. Left some comments. This content is a bit different because they're part of the e-book series so they have some different styles.
...vices-architecture/docker-application-development-process/docker-app-development-workflow.md
Outdated
Show resolved
Hide resolved
...d-lifecycle-architecture/design-develop-containerized-apps/visual-studio-tools-for-docker.md
Outdated
Show resolved
Hide resolved
...d-lifecycle-architecture/design-develop-containerized-apps/visual-studio-tools-for-docker.md
Outdated
Show resolved
Hide resolved
...d-lifecycle-architecture/design-develop-containerized-apps/visual-studio-tools-for-docker.md
Outdated
Show resolved
Hide resolved
...vices-architecture/docker-application-development-process/docker-app-development-workflow.md
Outdated
Show resolved
Hide resolved
|
||
**Figure 5-13**. Example of testing your Docker application locally using localhost | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because this is a book, this needs to have these numbered figures as well
@mairaw Thanks for the review. I've addressed everything and reviewed on staging. |
@mairaw - ping on this. |
...d-lifecycle-architecture/design-develop-containerized-apps/visual-studio-tools-for-docker.md
Outdated
Show resolved
Hide resolved
...d-lifecycle-architecture/design-develop-containerized-apps/visual-studio-tools-for-docker.md
Outdated
Show resolved
Hide resolved
|
||
To see more about installing Visual Studio Tools for Docker, go to <http://aka.ms/vstoolsfordocker> and <https://docs.microsoft.com/aspnet/core/host-and-deploy/docker/visual-studio-tools-for-docker>. | ||
There are two levels of Docker support you can add to a project. In .NET Core web app projects, you can just add a *Dockerfile* file to the project by enabling Docker support. The next level is container orchestrator support, which adds a *Dockerfile* to the project (if it doesn't already exist) and a *docker-compose.yml* file at the solution level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lisaguthrie from the talk today, my understanding is that you don't have the docker-compose file anymore and all you get is the Dockerfile. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is incorrect, based on my most recent info from Lisa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to squash and merge when you're ready @gewarren.
@mairaw Thanks! Merging now. |
@ghogen This has been merged now if you want to add in your updates. |
Fixes #7341
Fixes #7638
Part of the fix for #7172.