Skip to content

Commit 1941f78

Browse files
🧹 Prebuilt devcontainer images (LayerZero-Labs#948)
1 parent 389f95b commit 1941f78

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

‎.devcontainer/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<p align="center">
2+
<a href="https://layerzero.network">
3+
<img alt="LayerZero" style="width: 50%" src="https://layerzero.network/static/logo.svg"/>
4+
</a>
5+
</p>
6+
7+
<p align="center">
8+
<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>
9+
</p>
10+
11+
<h1 align="center">Devcontainer setup</h1>
12+
13+
## Usage
14+
15+
### Prebuilt images (default)
16+
17+
By default, the devcontainer will use the prebuilt base images from [GHCR](https://github.com/LayerZero-Labs/devtools/pkgs/container/devtools-dev-base).
18+
19+
### Local images
20+
21+
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.
22+
23+
To do this, use the provided `devcontainer.local.json` instead of the `devcontainer.json`

‎.devcontainer/devcontainer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"name": "LayerZero Devtools",
3-
"build": {
4-
"context": "..",
5-
"dockerfile": "../Dockerfile",
6-
"target": "base"
7-
},
3+
"image": "ghcr.io/layerzero-labs/devtools-dev-base:latest",
84
"mounts": ["type=volume,target=${containerWorkspaceFolder}/node_modules"],
95
"runArgs": ["--env-file", ".env"],
106
"features": {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "LayerZero Devtools",
3+
"build": {
4+
"context": "..",
5+
"dockerfile": "../Dockerfile",
6+
"target": "base"
7+
},
8+
"mounts": ["type=volume,target=${containerWorkspaceFolder}/node_modules"],
9+
"runArgs": ["--env-file", ".env"],
10+
"features": {
11+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
12+
"moby": false
13+
}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"bdavs.expect",
19+
"esbenp.prettier-vscode",
20+
"formulahendry.docker-explorer",
21+
"dbaeumer.vscode-eslint",
22+
"jetmartin.bats",
23+
"shd101wyy.markdown-preview-enhanced",
24+
"redhat.vscode-yaml",
25+
"JuanBlanco.solidity",
26+
"ms-vscode.makefile-tools",
27+
"me-dutour-mathieu.vscode-github-actions",
28+
"tamasfe.even-better-toml"
29+
]
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)