-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and document minimal devcontainers setup (#91)
- Loading branch information
1 parent
55e3208
commit 6d7ace3
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:bookworm | ||
|
||
# Download bazelisk and place it in $PATH | ||
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 | ||
RUN chmod +x bazelisk-linux-amd64 | ||
RUN mv bazelisk-linux-amd64 /usr/local/bin/bazel | ||
|
||
# Install python3 and pip to setup pre-commit | ||
RUN apt update && apt install -y --no-install-recommends \ | ||
python3-setuptools \ | ||
python3-pip \ | ||
python3-dev \ | ||
python3-venv | ||
|
||
# Install pre-commit | ||
RUN pip install --break-system-packages pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"build": { | ||
// instructs devcontainers to use a Dockerfile | ||
// rather than a pre-defined image | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-azuretools.vscode-docker", // docker support | ||
"BazelBuild.vscode-bazel" // bazel support | ||
] | ||
} | ||
}, | ||
// sets up pre-commit hooks | ||
"postStartCommand": "pre-commit install" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters