From f2989ec73b490a8d522b436066e4750316f26a1e Mon Sep 17 00:00:00 2001 From: Maina Wycliffe <12270550+mainawycliffe@users.noreply.github.com> Date: Mon, 8 Aug 2022 20:22:32 +0300 Subject: [PATCH] Add a Github Codespace Config based on gitpod dockerfile (#4185) * Add a codespace config based on gitpod dockerfile This will ensure contributors using Github Codespaces also have to correct environemnt setup, with all packages installed. * chore: rename Dockerfile Co-authored-by: Nate Moore --- .gitpod.Dockerfile => .Dockerfile | 0 .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ .gitpod.yml | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) rename .gitpod.Dockerfile => .Dockerfile (100%) create mode 100644 .devcontainer/devcontainer.json diff --git a/.gitpod.Dockerfile b/.Dockerfile similarity index 100% rename from .gitpod.Dockerfile rename to .Dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..abe614583 --- /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/microsoft/vscode-dev-containers/tree/v0.238.1/containers/docker-existing-dockerfile +{ + "name": "Contribute to Astro CodeSpaces", + + // 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", + + // 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 - for example installing curl. + "postCreateCommand": "pnpm install" + + // Uncomment when using a ptrace-based debugger like C++, Go, and Rust + // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], + + // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. + // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], + + // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. + // "remoteUser": "vscode" +} diff --git a/.gitpod.yml b/.gitpod.yml index 97ce81997..3bca56d1d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,6 @@ --- image: - file: .gitpod.Dockerfile + file: .Dockerfile # Commands to start on workspace startup tasks: - init: |