Skip to content

Latest commit

 

History

History
93 lines (72 loc) · 4.78 KB

GETTING_STARTED_IN_DEV_CONTAINER.md

File metadata and controls

93 lines (72 loc) · 4.78 KB

Getting Started with Bowling Game kata in Haskell using a Dev Container

Important Note

This feature is still at an experimental stage.

We are exploring different options allowing people to run the kata without the need to install any language-specific SDK and tools locally. We see Dev Containers as a promising solution allowing us to achieve this goal.

Feel free to give it a try, and let us know what you think!

Prerequisites

About Dev Containers

In case you're not familiar with Dev Containers, you may have a look at this page for further details.

Our current implementation leverages on GitHub Codespaces and VS Code.

We may extend it in the future to alternate Dev Containers hosting solutions and IDEs.

Step 1 - Create a new codespace

  • Open GitHub Codespaces page in a browser. If not done yet, log in with your GitHub account
  • Click on New codespace
  • Enter the "Repository": murex/Kata-BowlingGame
  • Enter the "Branch" you intend to work on (we recommend creating a dedicated branch)
  • Choose the "Dev container configuration": Haskell
  • Use the proposed values for "Region" and "Machine type"
  • Click on Create codespace button
  • Give GitHub Codespaces a few minutes to create and initialize the new codespace.
  • When done, GitHub Codespaces opens a new browser window or tab running VS Code for the web.

Step 2 - Rename your codespace Optional

GitHub Codespaces give a random name to the codespaces it creates.

This is fine as long as you're using one single codespace, but as soon as you have more than one it can become painful to know which is one. For this reason we recommend renaming your codespace so that you know right away what it is about:

  • Go back to your GitHub Codespaces page in a browser
  • The newly created codespace should appear in the list of your owned codespaces (refresh the page if you don't see it)
  • Click on the ... button to the right of the codespace, and select Rename
  • Pick whichever name makes sense to you. If you plan to run Kata-BowlingGame with more than one language, we recommend renaming it to haskell to differentiate it with other codespaces created from the same repository but for a different language
  • Click Save button to apply the new codespace name

Step 3 - Run the kata

You can either:

  • 🅰 Run the kata directly from VS Code for the Web
  • 🅱 Run VS Code locally on your machine and attach it to the dev container that you've just created

While option 🅰 is the most straightforward approach (zero-install), its capabilities so far are more limited than a locally running IDE. It may also feel less responsive than using a local IDE.

For these reasons you may prefer to go with option 🅱 in order to take full benefit of using your local IDE.

🅰 Run the kata in VS Code for the Web

🅱 Run the kata through attaching locally running VS Code to the dev container