Skip to content

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

Merged
merged 22 commits into from
Sep 25, 2018
Merged

Update VS Tools for Docker topic #7214

merged 22 commits into from
Sep 25, 2018

Conversation

gewarren
Copy link
Contributor

@gewarren gewarren commented Aug 22, 2018

  • update/standardize links
  • remove VS 2015 section
  • add alt text for images, and remove "figure" labels
  • acrolinx-type stuff
  • add See also section

Fixes #7341
Fixes #7638

Part of the fix for #7172.

@gewarren gewarren changed the title Update vs tools for docker topic Update VS Tools for Docker topic Aug 22, 2018
- **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)
Copy link
Contributor

@mairaw mairaw Aug 23, 2018

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

@mairaw mairaw requested a review from CESARDELATORRE August 23, 2018 16:47

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.
Copy link
Contributor

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.

@gewarren
Copy link
Contributor Author

Okay. How do I know if a topic is part of an e-book?

@CESARDELATORRE
Copy link
Contributor

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.

@mairaw
Copy link
Contributor

mairaw commented Aug 24, 2018

@gewarren:

Okay. How do I know if a topic is part of an e-book?

First, that's the only place that will have these different links.
But here you can see all the paths tagged as dotnet-ebooks. So that would the ms.technology of those topics online.
https://github.com/dotnet/docs/blob/master/docfx.json#L185

@gewarren
Copy link
Contributor Author

I am OOF next week but this is ready to go from my POV.

@mairaw
Copy link
Contributor

mairaw commented Aug 28, 2018

@lisaguthrie
Copy link

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.

@gewarren
Copy link
Contributor Author

gewarren commented Sep 4, 2018

@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.
Copy link
Contributor

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.
Copy link
Contributor

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.

@lisaguthrie
Copy link

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.

@gewarren
Copy link
Contributor Author

gewarren commented Sep 6, 2018

@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?

@gewarren
Copy link
Contributor Author

gewarren commented Sep 6, 2018

@ghogen I think you are looking at an old diff. Can you refresh?

@ghogen
Copy link
Contributor

ghogen commented Sep 6, 2018

@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.

@ghogen
Copy link
Contributor

ghogen commented Sep 6, 2018

@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".

@gewarren
Copy link
Contributor Author

gewarren commented Sep 7, 2018

@ghogen Thanks for reviewing!

@gewarren
Copy link
Contributor Author

@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.

@lisaguthrie
Copy link

@gewarren thanks for the ping! It looks good :)

@gewarren
Copy link
Contributor Author

@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?

@ghogen
Copy link
Contributor

ghogen commented Sep 18, 2018

@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.

@gewarren
Copy link
Contributor Author

@mairaw Can you sign off on this so I can merge it? Thanks!

Copy link
Contributor

@mairaw mairaw left a 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.


**Figure 5-13**. Example of testing your Docker application locally using localhost
![Example of testing your Docker application locally using localhost](./media/image18.png)
Copy link
Contributor

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

@gewarren
Copy link
Contributor Author

@mairaw Thanks for the review. I've addressed everything and reviewed on staging.

@gewarren
Copy link
Contributor Author

@mairaw - ping on this.


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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@mairaw mairaw left a 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.

@gewarren
Copy link
Contributor Author

@mairaw Thanks! Merging now.

@gewarren gewarren merged commit ac28966 into dotnet:master Sep 25, 2018
@gewarren
Copy link
Contributor Author

@ghogen This has been merged now if you want to add in your updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

link to mstoolsfordocker is broken Documentation needs to be updated to reflect VS 15.8+
5 participants