Skip to content

Commit e9bf8fc

Browse files
committed
feat: dev container improvements
1 parent 60b06b3 commit e9bf8fc

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ ENV DEBIAN_FRONTEND=noninteractive
66
# Switch to root for installing packages
77
USER root
88

9-
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
10-
119
# Install additional dependencies
1210
RUN apt update && apt install -y \
1311
build-essential \
14-
nodejs \
12+
curl \
1513
jq \
1614
python3 \
1715
python3-pip \
@@ -20,8 +18,12 @@ RUN apt update && apt install -y \
2018
&& apt clean \
2119
&& rm -rf /var/lib/apt/lists/*
2220

23-
# Install Node.js
24-
RUN npm install -g n && n 20.12.0
21+
# Install Node.js 20.x using NodeSource
22+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
23+
apt update && \
24+
apt install -y nodejs && \
25+
apt clean && \
26+
rm -rf /var/lib/apt/lists/*
2527

2628
# Install Solidity compiler using pipx (isolated environment)
2729
RUN pipx install solc-select && \
@@ -59,9 +61,10 @@ RUN curl -L https://foundry.paradigm.xyz | bash && \
5961
chmod 755 /usr/local/bin/forge && \
6062
chmod 755 /usr/local/bin/chisel
6163

62-
# Set up yarn
64+
# Set up yarn and pnpm
6365
RUN corepack enable && \
64-
corepack prepare yarn@4.0.2 --activate
66+
corepack prepare yarn@4.0.2 --activate && \
67+
corepack prepare pnpm@9.0.6 --activate
6568

6669
# Ensure all users have access to the tools
6770
RUN chmod 755 /usr/local/bin/* && \

.devcontainer/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ services:
3636
- vscode-data:/home/vscode/.local/share
3737
- vscode-bin:/home/vscode/.local/bin
3838

39+
# Shared pnpm cache (safe due to content-addressable storage)
40+
- pnpm-store:/home/vscode/.local/share/pnpm
41+
- pnpm-cache:/home/vscode/.cache/pnpm
42+
3943
volumes:
4044
vscode-cache:
4145
vscode-config:
4246
vscode-data:
4347
vscode-bin:
48+
pnpm-store:
49+
pnpm-cache:

.devcontainer/setup-git-signing.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/env bash
1+
#!/usr/bin/env bash
22
# Automatically configure Git to use SSH signing with forwarded SSH keys
33
set -euo pipefail
44

0 commit comments

Comments
 (0)