Skip to content

Commit

Permalink
Add VSCode devcontainers
Browse files Browse the repository at this point in the history
Should be useful for getting a development environment setup quickly.
  • Loading branch information
MikeMcQuaid committed Oct 27, 2022
1 parent 3da846d commit dd39b2b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Homebrew/brew",
"image": "ghcr.io/homebrew/brew:latest",
"workspaceFolder": "/home/linuxbrew/.linuxbrew/Homebrew",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/linuxbrew/.linuxbrew/Homebrew,type=bind,consistency=cached",
"onCreateCommand": ".devcontainer/on-create-command.sh",
"remoteEnv": {
"HOMEBREW_GITHUB_API_TOKEN": "${localEnv:GITHUB_TOKEN}"
}
}
10 changes: 10 additions & 0 deletions .devcontainer/on-create-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e

sudo apt-get update
sudo apt-get install -y \
-o Dpkg::Options::=--force-confdef \
-o Dpkg::Options::=--force-confnew \
zsh \
shellcheck \
zsh-autosuggestions
10 changes: 10 additions & 0 deletions .devcontainer/ubuntu18.04/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Homebrew/brew-ubuntu18.04",
"image": "ghcr.io/homebrew/ubuntu18.04:latest",
"workspaceFolder": "/home/linuxbrew/.linuxbrew/Homebrew",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/linuxbrew/.linuxbrew/Homebrew,type=bind,consistency=cached",
"onCreateCommand": ".devcontainer/on-create-command.sh",
"remoteEnv": {
"HOMEBREW_GITHUB_API_TOKEN": "${localEnv:GITHUB_TOKEN}"
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@
# Unignore our `brew` script.
!/bin/brew

# Unignore our documentation/completions.
# Unignore our configuration/completions/documentation.
!/.devcontainer
!/.github
!/completions
!/docs
Expand Down

0 comments on commit dd39b2b

Please sign in to comment.