Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lab: Setup GitHub Codespace

GitHub Codespaces and this workshop repository

Step-by-Step Guide to Set Up GitHub Codespace from Browser

  • Log in to GitHub

  • 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.

Environment Setup

Environment setup overview

This section covers the following:

  • Signing in to GitHub and forking the workshop repository
  • Creating a GitHub Codespace from your fork
  • Checking Docker and Docker Compose
  • Putting ~/.local/bin on your PATH for tools installed later in the course
  • Creating ~/peachycloudsecurity-lab-workspace and running docker run --rm hello-world once to confirm Docker runs containers

If you use GitHub Codespaces, start with Lab: Setup GitHub Codespace. That lab walks you from the public repo through fork, Codespaces, Docker checks, PATH, and workspace creation in one place.

If you run on your own Debian or Ubuntu machine with Docker already installed, skip the Codespace lab and use the blocks below, then open Lab: Workshop workspace.

Tool install path (local Linux)

Downloaded CLI tools in this course install into ~/.local/bin. Add it to your PATH once per profile:

mkdir -p ~/.local/bin
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"

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 ~/workspaces/container-security-workshop-lab/peachycloudsecurity-lab-workspace && cd ~/workspaces/container-security-workshop-lab/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

Note on CPU architecture

Several labs download pre-built binaries with curl. URLs often target x86_64 (amd64). On arm64 hosts, use the arm64 build from the same release page when the vendor publishes one. Individual labs call this out where it matters.

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, then docker version again.

Next step: Lab: Workshop workspace