Skip to content

Commit

Permalink
Support dev containers
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Jan 30, 2025
1 parent bc2703e commit 58b3abc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:24.04

SHELL ["/bin/bash", "-l", "-c"]

# Install essential packages
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
procps \
file \
unzip \
sudo \
&& rm -rf /var/lib/apt/lists/*

# Create sudoers directory and non-root user
RUN mkdir -p /etc/sudoers.d && \
useradd -m -s /bin/bash vscode && \
echo "vscode ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode

# Switch to non-root user
USER vscode
WORKDIR /home/vscode

# Install Node
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
sudo apt-get install -y nodejs

# Install Bun
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/home/vscode/.bun/bin:${PATH}"

# Install Foundry
RUN curl -L https://foundry.paradigm.xyz | bash
RUN /home/vscode/.foundry/bin/foundryup -i nightly
13 changes: 13 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "EthSign: Solidity",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": ["juanblanco.solidity", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "adpyke.codesnap"]
}
},
"remoteUser": "vscode",
"features": {}
}
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
"author": "jxu@ethsign.xyz",
"license": "ISC",
"dependencies": {
"@openzeppelin/contracts": "5.1.0",
"@openzeppelin/contracts-upgradeable": "5.1.0"
"@openzeppelin/contracts": "5.2.0",
"@openzeppelin/contracts-upgradeable": "5.2.0"
},
"devDependencies": {
"@nomicfoundation/hardhat-foundry": "^1.1.3",
"@nomicfoundation/hardhat-toolbox": "5.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.12",
"@openzeppelin/hardhat-upgrades": "^3.8.0",
"@openzeppelin/hardhat-upgrades": "^3.9.0",
"@types/bun": "latest",
"ethers": "^6.13.4",
"dotenv": "^16.4.7",
"hardhat": "^2.22.17",
"hardhat": "^2.22.18",
"hardhat-deploy": "^0.14.0",
"prettier": "^3.4.2",
"solhint": "^5.0.3",
"solhint": "^5.0.5",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}
Expand Down

0 comments on commit 58b3abc

Please sign in to comment.