Skip to content

Commit 4921c53

Browse files
authored
Add files via upload
1 parent 3f354aa commit 4921c53

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

devcontainer/Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# syntax=docker/dockerfile:1
2+
FROM mcr.microsoft.com/devcontainers/base:bookworm
3+
4+
ARG USERNAME=vscode
5+
6+
# ---- OS deps ----
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
build-essential \
9+
pkg-config \
10+
libssl-dev \
11+
ca-certificates \
12+
curl \
13+
git \
14+
unzip \
15+
jq \
16+
python3 \
17+
python3-pip \
18+
openssh-client \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# ---- Rust toolchain ----
22+
# Keep the install in the image so devcontainer startup is fast.
23+
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
24+
ENV PATH="/root/.cargo/bin:${PATH}"
25+
RUN rustup component add rustfmt clippy
26+
27+
# ---- Solana CLI (optional but convenient) ----
28+
# Pin a version so builds are reproducible.
29+
ARG SOLANA_VERSION=1.18.22
30+
RUN curl -sSfL https://release.solana.com/v${SOLANA_VERSION}/install | bash -s -- -u /usr/local/solana -s v${SOLANA_VERSION}
31+
ENV PATH="/usr/local/solana/active_release/bin:${PATH}"
32+
33+
# ---- Anchor (optional) ----
34+
# Anchor version pin is maintained by your repo; this just installs a recent stable anchor.
35+
# If you want strict pinning, set ANCHOR_VERSION.
36+
ARG ANCHOR_VERSION=0.30.1
37+
RUN cargo install --locked anchor-cli --version ${ANCHOR_VERSION} || true
38+
39+
# ---- Node (provided by devcontainer feature) ----
40+
# Ensure npm is available and corepack is enabled.
41+
RUN corepack enable || true
42+
43+
# ---- Non-root user ----
44+
RUN usermod -aG sudo ${USERNAME} || true
45+
46+
# ---- Workspace ----
47+
WORKDIR /workspaces/signia

devcontainer/devcontainer.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "SIGNIA Dev",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {
10+
"terminal.integrated.defaultProfile.linux": "bash",
11+
"editor.formatOnSave": true,
12+
"editor.defaultFormatter": "rust-lang.rust-analyzer",
13+
"rust-analyzer.checkOnSave.command": "clippy",
14+
"files.eol": "\n"
15+
},
16+
"extensions": [
17+
"rust-lang.rust-analyzer",
18+
"tamasfe.even-better-toml",
19+
"ms-azuretools.vscode-docker",
20+
"esbenp.prettier-vscode",
21+
"dbaeumer.vscode-eslint"
22+
]
23+
}
24+
},
25+
"remoteUser": "vscode",
26+
"features": {
27+
"ghcr.io/devcontainers/features/git:1": {},
28+
"ghcr.io/devcontainers/features/node:1": {
29+
"version": "20"
30+
}
31+
},
32+
"forwardPorts": [
33+
3000,
34+
7071,
35+
8787
36+
],
37+
"portsAttributes": {
38+
"3000": {
39+
"label": "Console Web (Next.js)"
40+
},
41+
"7071": {
42+
"label": "Interface Service"
43+
},
44+
"8787": {
45+
"label": "Signia API"
46+
}
47+
},
48+
"postCreateCommand": "bash scripts/bootstrap.sh && bash scripts/build_all.sh",
49+
"postStartCommand": "echo 'SIGNIA devcontainer ready. Run: bash scripts/test_all.sh'"
50+
}

0 commit comments

Comments
 (0)