Skip to content

Setup: Create and Open a New Project

This section will guide you through creating a new repository on GitHub and opening that new repository in Visual Studio Code.

Note

There are multiple approaches to accomplish these same tasks. This section represents one workflow.

Create a Repo on GitHub

This workflow will start with creating a repository for your project on GitHub. GitHub provides remote version control system for your local repository and many advanced collaboration capabilities.

You can learn more about GitHub in the GitHub Documentation.

  1. NAVIGATE to GitHub

  2. CLICK the New button next to Repositories

github-home

new-github-repo

  1. NAME the repo docker-foundations-lab (#1 in the image above)

  2. SET the repo to Private (#2 in the image above)

  3. CLICK Add a README file (# 3 in the image above)

  4. CLICK Add .gitignore and SELECT Python (# 3 in the image above)

  5. CLICK Choose a license and SELECT Apache License 2.0 (# 3 in the image above)

  6. CLICK Create Repository (# 4 in the image above)

created-repo

Now that you have created your new repository on GitHub you can move forward with opening this new project in Visual Studio Code.

Opening Your Repo in Visual Studio Code

There are two ways to approach this step:

  1. Manually clone the repo from the terminal
  2. Use the functionality built into Visual Studio Code

Manually Clone Method

  1. NAVIGATE to your repo on GitHub

  2. CLICK the Code button

  3. SELECT the transport (HTTPS or SSH)

  4. CLICK the Copy icon ​ copy-github-clone-string

  5. OPEN a new Terminal

  6. PASTE git clone plus that string into your Terminal

    Example

    SSH git clone git@github.com:jandiorio/docker-foundations-lab.git

    HTTPS git clone https://github.com/jandiorio/docker-foundations-lab.git

    Important

    The command above will clone down the repository creating a subfolder with the name of the repo in the folder where you ran the command.

    Clone Project Repo

  7. OPEN the new Folder in Visual Studio Code using Open Folder

Clone and Open Directly in Visual Studio Code

  1. OPEN a new Visual Studio Code Window

  2. CLICK the Explorer icon image-20210611101144837

  3. CLICK Clone Repository

    VSC Repo Clone

  4. PASTE repository string

    VSC Paste Repo

  5. SELECT the parent directory

    Tip

    I have a folder named development where all of my development projects are located.

  6. CLICK Open in the dialog prompt to Open the Repository image-20210611102053356

What's Next

🍅 Now you are ready to get to the "meat" of the tomato...next you will walk through the basics of building a Dockerfile.