-
Notifications
You must be signed in to change notification settings - Fork 115
add .devcontainer #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| FROM ubuntu:24.04 | ||
|
|
||
| WORKDIR /home/ | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN bash ./setup.sh | ||
|
|
||
| ENV PATH="/root/.cargo/bin:$PATH" | ||
| ENV TZ=Asia/Shanghai | ||
| ENV LANG=en_US.UTF-8 | ||
| ENV LC_ALL=en_US.UTF-8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "name": "W3IF - Codespaces", | ||
| "dockerFile": "Dockerfile", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "rust-lang.rust-analyzer", | ||
| "vadimcn.vscode-lldb", | ||
| "tamasfe.even-better-toml", | ||
| "ms-vscode.cpptools" | ||
| ], | ||
| "settings": { | ||
| "editor.formatOnSave": true, | ||
| "terminal.integrated.defaultProfile.linux": "bash", | ||
| "files.exclude": { | ||
| "**/CODE_OF_CONDUCT.md": true, | ||
| "**/LICENSE": true | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "hostRequirements": { | ||
| "cpus": 16, | ||
| "memory": "64gb", | ||
| "storage": "128gb" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,38 @@ | ||||||||||||||||||||||||||||||||||||||
| ## update and install some things we should probably have | ||||||||||||||||||||||||||||||||||||||
| apt-get update | ||||||||||||||||||||||||||||||||||||||
| apt-get upgrade -y | ||||||||||||||||||||||||||||||||||||||
| apt-get install -y \ | ||||||||||||||||||||||||||||||||||||||
| apt-utils \ | ||||||||||||||||||||||||||||||||||||||
| curl \ | ||||||||||||||||||||||||||||||||||||||
| git \ | ||||||||||||||||||||||||||||||||||||||
| git-lfs \ | ||||||||||||||||||||||||||||||||||||||
| gnupg2 \ | ||||||||||||||||||||||||||||||||||||||
| jq \ | ||||||||||||||||||||||||||||||||||||||
| build-essential \ | ||||||||||||||||||||||||||||||||||||||
| openssl \ | ||||||||||||||||||||||||||||||||||||||
| libssl-dev \ | ||||||||||||||||||||||||||||||||||||||
| pkg-config \ | ||||||||||||||||||||||||||||||||||||||
| cmake \ | ||||||||||||||||||||||||||||||||||||||
| wget \ | ||||||||||||||||||||||||||||||||||||||
| file \ | ||||||||||||||||||||||||||||||||||||||
| ca-certificates \ | ||||||||||||||||||||||||||||||||||||||
| zstd \ | ||||||||||||||||||||||||||||||||||||||
| clang \ | ||||||||||||||||||||||||||||||||||||||
| lld \ | ||||||||||||||||||||||||||||||||||||||
| protobuf-compiler \ | ||||||||||||||||||||||||||||||||||||||
| seccomp \ | ||||||||||||||||||||||||||||||||||||||
| libseccomp-dev | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Install rustup and common components | ||||||||||||||||||||||||||||||||||||||
| curl https://sh.rustup.rs -sSf | sh -s -- -y | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| # Download and verify rustup-init (pinned version) | |
| RUSTUP_VERSION=1.26.0 | |
| RUSTUP_ARCH=x86_64-unknown-linux-gnu | |
| RUSTUP_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init" | |
| RUSTUP_SHA256_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init.sha256" | |
| wget -O /tmp/rustup-init "$RUSTUP_URL" | |
| wget -O /tmp/rustup-init.sha256 "$RUSTUP_SHA256_URL" | |
| cd /tmp | |
| sha256sum -c rustup-init.sha256 | |
| if [ $? -ne 0 ]; then | |
| echo "rustup-init checksum verification failed!" >&2 | |
| exit 1 | |
| fi | |
| chmod +x rustup-init | |
| ./rustup-init -y | |
| cd - |
Copilot
AI
Oct 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wget command downloads to the current directory (/home/), but the zstd command expects the file to be in /home/. This works correctly, but the path inconsistency could be confusing. Consider using explicit paths or downloading directly to /home/.
| wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst | |
| wget -O /home/buck2-x86_64-unknown-linux-gnu.zst https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst |
Copilot
AI
Oct 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'latest' for the Buck2 download makes the build non-reproducible. Consider pinning to a specific version for consistency across environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell scripts should start with a shebang line (e.g.,
#!/bin/bash) to explicitly specify the interpreter.