|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. |
1 | 2 | { |
2 | | - "name": "Hardhat + EDR", |
3 | | - "image": "mcr.microsoft.com/devcontainers/base:bullseye", |
| 3 | + "name": "Foundry Development", |
| 4 | + "build": { |
| 5 | + "context": "..", |
| 6 | + "dockerfile": "Dockerfile.dev" |
| 7 | + }, |
| 8 | + |
4 | 9 | "features": { |
5 | | - "ghcr.io/devcontainers/features/node:1": { |
6 | | - "version": "20" |
| 10 | + "ghcr.io/devcontainers/features/common-utils:2": { |
| 11 | + "installZsh": true, |
| 12 | + "configureZshAsDefaultShell": true, |
| 13 | + "installOhMyZsh": true, |
| 14 | + "upgradePackages": true |
7 | 15 | } |
8 | 16 | }, |
9 | | - "postCreateCommand": "scripts/setup.sh", |
10 | | - "containerEnv": { |
11 | | - "ALCHEMY_URL": "${localEnv:ALCHEMY_URL}", |
12 | | - "INFURA_URL": "${localEnv:INFURA_URL}" |
13 | | - }, |
| 17 | + |
| 18 | + "forwardPorts": [], |
| 19 | + |
| 20 | + "postCreateCommand": "rustup default stable && rustup update", |
| 21 | + |
14 | 22 | "customizations": { |
15 | 23 | "vscode": { |
16 | 24 | "extensions": [ |
17 | | - "esbenp.prettier-vscode", |
18 | | - "NomicFoundation.hardhat-solidity" |
19 | | - ] |
| 25 | + "rust-lang.rust-analyzer", |
| 26 | + "serayuzgur.crates", |
| 27 | + "tamasfe.even-better-toml", |
| 28 | + "ms-python.python", |
| 29 | + "dbaeumer.vscode-eslint", |
| 30 | + "oven.bun-vscode" |
| 31 | + ], |
| 32 | + "settings": { |
| 33 | + "rust-analyzer.checkOnSave": true, |
| 34 | + "rust-analyzer.cargo.features": "all" |
| 35 | + } |
20 | 36 | } |
21 | | - } |
| 37 | + }, |
| 38 | + |
| 39 | + "remoteUser": "foundry", |
| 40 | + |
| 41 | + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", |
| 42 | + |
| 43 | + "workspaceFolder": "/workspace", |
| 44 | + |
| 45 | + "mounts": [ |
| 46 | + "source=${localEnv:HOME}/.cargo/registry,target=/home/foundry/.cargo/registry,type=bind,consistency=cached", |
| 47 | + "source=${localEnv:HOME}/.cargo/git,target=/home/foundry/.cargo/git,type=bind,consistency=cached" |
| 48 | + ] |
22 | 49 | } |
0 commit comments