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.
-
NAVIGATE to GitHub
-
CLICK the New button next to Repositories
-
NAME the repo docker-foundations-lab (#1 in the image above)
-
SET the repo to Private (#2 in the image above)
-
CLICK Add a README file (# 3 in the image above)
-
CLICK Add .gitignore and SELECT Python (# 3 in the image above)
-
CLICK Choose a license and SELECT Apache License 2.0 (# 3 in the image above)
-
CLICK Create Repository (# 4 in the image above)
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:
- Manually clone the repo from the terminal
- Use the functionality built into Visual Studio Code
Manually Clone Method
-
NAVIGATE to your repo on GitHub
-
CLICK the Code button
-
SELECT the transport (HTTPS or SSH)
-
OPEN a new Terminal
-
PASTE
git clone
plus that string into your TerminalExample
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.
-
OPEN the new Folder in Visual Studio Code using Open Folder
Clone and Open Directly in Visual Studio Code
-
OPEN a new Visual Studio Code Window
-
CLICK the Explorer icon
-
CLICK Clone Repository
-
PASTE repository string
-
SELECT the parent directory
Tip
I have a folder named development where all of my development projects are located.
-
CLICK Open in the dialog prompt to Open the Repository
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
.