Lab: Setup GitHub Codespace

Step-by-Step Guide to Set Up GitHub Codespace from Browser
-
Log in to GitHub
- Open GitHub and log in to your account.
- Open the workshop lab repository in your browser: peachycloudsecurity/container-security-workshop-lab.
-
Fork the repository
- Fork peachycloudsecurity/container-security-workshop-lab into your GitHub account so you own the copy you open in Codespaces.
Disclaimer: Training sessions may point at a different branch or fork. Always use the repository URL your instructor gives you. This guide uses the public workshop repo above.
- In the top-right corner, click Fork and complete the fork flow. Wait until GitHub opens your fork.
-
Open your fork in a Codespace
- Go to your fork of the repository (under your user or organisation).
- Click the green Code button, then open the Codespaces tab.
- Choose Create codespace on main (or the branch your instructor named).
-
Wait for initialization
- GitHub builds a Linux development container. First start often takes one to two minutes.
- When the editor loads, you get a VS Code style environment in the browser with an integrated terminal.
-
Configure your environment
- After the shell prompt appears in the Codespace, run the commands in the next section once.
Terminal setup
- Run these in the Codespace integrated terminal (the terminal inside the browser editor). This is still the Linux environment GitHub created for you, not a separate SSH box.
Docker
docker version
docker compose version
- Workspace and hello-world
mkdir -p ~/peachycloudsecurity-lab-workspace && cd ~/peachycloudsecurity-lab-workspace
docker run --rm hello-world
You should see the hello-world completion text. That only checks that Docker can pull and run an image from this Codespace.
- Cleanup
docker rmi hello-world
Troubleshooting
- Slow or stuck build: stop the Codespace from GitHub Codespaces and start again on the right branch if your instructor agrees.
- Docker not responding:
sudo dockerd &, wait a few seconds, thendocker versionagain.
Next step: Lab: Workshop workspace