Exercise - Prepare the project

Completed

You'll be working with a Python project that shows a dashboard of products. To run this project in a container, you'll need the Dev Containers extension for Visual Studio Code.

In this exercise, you'll clone one of the agency's projects—a Products Dashboard written in Python—and install the Dev Containers extension for Visual Studio Code.

Clone the sample repo

  1. Ensure that Docker Desktop is installed and running on your machine.

  2. Copy the URL for the sample repo to your clipboard.

    https://github.com/MicrosoftDocs/mslearn-python-products
    
  3. Open a new instance of Visual Studio Code.

  4. Select the Clone Repository button in the sidebar, or press F1 to open the Command Palette and search for Git: Clone.

  5. Paste in the URL from your clipboard.

  6. Select a location on your disk where the project can be cloned to.

  7. Select Open from the notification in Visual Studio Code.

  8. If you see a pop-up that asks if you trust the authors, select Yes, I trust the authors.

The project should now be open in Visual Studio Code.

Note

If you receive a warning in Visual Studio Code about selecting a Python interpreter, you can safely ignore it.

Install the Dev Containers extension

  1. Select the "Extensions" icon in the Activity Bar to open the Extensions viewlet.

    Screenshot of the Visual Studio Code activity bar with Extension icon highlighted

  2. Type dev containers.

  3. Locate the Dev Containers extension and select the Install button.

    Screenshot of the Visual Studio Code extension gallery showing Dev Containers extension.

The Dev Containers extension will install, and you'll have access to the commands that it adds to Visual Studio Code.