Skip to content

Commit

Permalink
Add a Github Codespace Config based on gitpod dockerfile (withastro#4185
Browse files Browse the repository at this point in the history
)

* 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 <[email protected]>
  • Loading branch information
mainawycliffe and natemoo-re authored Aug 8, 2022
1 parent d3ceb61 commit f2989ec
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
File renamed without changes.
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
file: .gitpod.Dockerfile
file: .Dockerfile
# Commands to start on workspace startup
tasks:
- init: |
Expand Down

0 comments on commit f2989ec

Please sign in to comment.