From ea864fc890dffdc7f352a2a444c90dbc38d16c00 Mon Sep 17 00:00:00 2001 From: Eric Riese <4515131+er2@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:00:38 -0500 Subject: [PATCH] Support Development Containers, add GitHub Codespaces badge --- .devcontainer/Dockerfile | 1 + .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ README.md | 16 ++++++++++++++++ 3 files changed, 43 insertions(+) create mode 120000 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 120000 index 00000000..395595cf --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1 @@ +../Dockerfile \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b8713f4f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "GameShell Dev Container", + "build": { + // Sets the run context to one level up instead of the .devcontainer folder. + "context": "..", + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerfile": "Dockerfile" + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "devcontainer" +} diff --git a/README.md b/README.md index 1fd3988a..434553ec 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ We are particularly interested in any new missions you might create! Getting started --------------- +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=683544958) + GameShell should work on any standard Linux system, and also on macOS and BSD (but we have run fewer tests on the latter systems). On Debian or Ubuntu, the only dependencies (besides `bash`) are the `gettext-base` and `awk` packages @@ -72,6 +74,20 @@ you want to run X programs from inside GameShell. Refer to [this section](./doc/deps.md#running-GameShell-from-a-docker-container) of the user manual. +Github Codespaces +----------------- + +This repository features a [devcontainer.json](https://containers.dev/) enabling +GameShell to be run directly from a [Github Codespace](https://github.com/features/codespaces). + +Once the Codespace is launched, you can run GameShell in the terminal with: + +```sh +bash start.sh +``` + +To get the same experience on your local machine without the limitations/cost +of Codespaces see [the Dev Container docs](https://containers.dev/supporting#tools) Documentation -------------