Skip to content

Commit

Permalink
🧹 Prebuilt devcontainer images (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Oct 25, 2024
1 parent 389f95b commit 1941f78
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<p align="center">
<a href="https://layerzero.network">
<img alt="LayerZero" style="width: 50%" src="https://layerzero.network/static/logo.svg"/>
</a>
</p>

<p align="center">
<a href="https://layerzero.network" style="color: #a77dff">Homepage</a> | <a href="https://docs.layerzero.network/" style="color: #a77dff">Docs</a> | <a href="https://layerzero.network/developers" style="color: #a77dff">Developers</a>
</p>

<h1 align="center">Devcontainer setup</h1>

## Usage

### Prebuilt images (default)

By default, the devcontainer will use the prebuilt base images from [GHCR](https://github.com/LayerZero-Labs/devtools/pkgs/container/devtools-dev-base).

### Local images

If the prebuilt images are not available or not accessible, or if work on the base images needs to be tested in a devcontainer, they can be built locally.

To do this, use the provided `devcontainer.local.json` instead of the `devcontainer.json`
6 changes: 1 addition & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"name": "LayerZero Devtools",
"build": {
"context": "..",
"dockerfile": "../Dockerfile",
"target": "base"
},
"image": "ghcr.io/layerzero-labs/devtools-dev-base:latest",
"mounts": ["type=volume,target=${containerWorkspaceFolder}/node_modules"],
"runArgs": ["--env-file", ".env"],
"features": {
Expand Down
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "LayerZero Devtools",
"build": {
"context": "..",
"dockerfile": "../Dockerfile",
"target": "base"
},
"mounts": ["type=volume,target=${containerWorkspaceFolder}/node_modules"],
"runArgs": ["--env-file", ".env"],
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": false
}
},
"customizations": {
"vscode": {
"extensions": [
"bdavs.expect",
"esbenp.prettier-vscode",
"formulahendry.docker-explorer",
"dbaeumer.vscode-eslint",
"jetmartin.bats",
"shd101wyy.markdown-preview-enhanced",
"redhat.vscode-yaml",
"JuanBlanco.solidity",
"ms-vscode.makefile-tools",
"me-dutour-mathieu.vscode-github-actions",
"tamasfe.even-better-toml"
]
}
}
}

0 comments on commit 1941f78

Please sign in to comment.