Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
310068b
feat: implement Go RCE engine with context timeouts and SRE structure…
Praneeth0910 May 23, 2026
feb68af
chore: init module and project skeleton
Praneeth0910 May 25, 2026
4e0d563
chore: add nsjail as git submodule at tag 3.4
Praneeth0910 May 25, 2026
394031b
feat: update Dockerfile to build nsjail from local submodule and add …
Praneeth0910 May 25, 2026
530be48
chore: add Dockerfile with nsjail build and Go binary
Praneeth0910 May 25, 2026
d01d0b6
chore: add Dockerfile with nsjail build and Go binary
Praneeth0910 May 25, 2026
dd7ac71
chore: add docker-compose.yml and Makefile
Praneeth0910 May 25, 2026
4da75a9
docs:Logged the todays key changes made in docs/ai/
Praneeth0910 May 25, 2026
4d9dc2a
eat(config): YAML language registry loader
Praneeth0910 May 25, 2026
4ea8f0d
feat(config): add languages.yaml with python3 and cpp
Praneeth0910 May 25, 2026
03103cc
feat(validate): filename path-traversal prevention and docs: logged o…
Praneeth0910 May 25, 2026
6d2e9b8
feat(validate): per-language flag allowlist
Praneeth0910 May 25, 2026
3559692
test(validate): comprehensive table-driven tests for filename and fla…
Praneeth0910 May 25, 2026
50ba412
docs: updated the docs logged the info, issues and exprience
Praneeth0910 May 25, 2026
ee3f2b8
feat(handler): GET /healthz with chi router
Praneeth0910 May 25, 2026
5ad5346
feat(runner): nsjail probe and language smoke probes
Praneeth0910 May 25, 2026
58c032b
feat(handler): GET /readyz
Praneeth0910 May 25, 2026
953f3b8
feat(handler): GET /info
Praneeth0910 May 25, 2026
86ff208
feat: add root redirect to info and introduce helper for formatted JS…
Praneeth0910 May 25, 2026
888d2c2
feat: add root redirect to info and introduce helper for formatted JS…
Praneeth0910 May 25, 2026
c2e56a9
feat(sandbox): per-request jail directory with unique ID
Praneeth0910 May 25, 2026
1dcd3e5
feat(runner): startup orphan sweep
Praneeth0910 May 25, 2026
3d83375
feat(runner): request size limits and output cap
Praneeth0910 May 25, 2026
d0f1a7c
feat(runner): nsjail invocation and process execution
Praneeth0910 May 25, 2026
53c8151
feat(status): status vocabulary and top-level rule
Praneeth0910 May 25, 2026
f0557e4
test:Created phase3_test.go
Praneeth0910 May 25, 2026
acbd7f0
chore: remove stray nsjail dir and compiled binary from root
Praneeth0910 May 26, 2026
bfaaf4d
chore: untrack contextmedia_AIagents folder and Zone.Identifier files
Praneeth0910 May 26, 2026
bba2b5f
fix(docker): clone nsjail at tag 3.4 directly instead of copying subm…
Praneeth0910 May 26, 2026
fddb3e2
fix(docker): install ca-certificates before git clone, disable ssl ve…
Praneeth0910 May 26, 2026
9d584f0
refactor: implement phase-specific nsjail configurations to handle bu…
Praneeth0910 May 26, 2026
a9aac05
optimised the docker-compose.yml for better performance
Praneeth0910 May 26, 2026
f6573a1
security: use Go filesystem APIs for jail dirs
Praneeth0910 May 26, 2026
a810a5d
security: cap child output with truncation marker
Praneeth0910 May 26, 2026
33abd6b
security: document all 7 holes with file:line links
Praneeth0910 May 26, 2026
ce6cf8b
test(runner): unit tests for status mapping and output comparison
Praneeth0910 May 26, 2026
04ef44a
test(config): unit tests for config loading and validation
Praneeth0910 May 26, 2026
4a29e66
feat(middleware): structured JSON request logging
Praneeth0910 May 26, 2026
5e4d449
test: documenting the testing results
Praneeth0910 May 26, 2026
90017a6
Add CI/CD pipelines: GitHub Actions and GitLab CI
Praneeth0910 May 26, 2026
eab9250
feat(stage1): optimize Docker build, fix runtime & probe bugs, and fi…
Praneeth0910 May 26, 2026
5ec0144
feat: add documentation and examples while implementing stderr filter…
Praneeth0910 May 26, 2026
953f91a
test: remove TestFilterStderr as the underlying filterStderr function…
Praneeth0910 May 26, 2026
9596c26
docs: update setup guide to include repository cloning and image buil…
Praneeth0910 May 26, 2026
dd04a24
Stage 1: Complete submission checklist, score 100%
Praneeth0910 May 27, 2026
8fe7890
Fix nsjail pipe leak timeout issue and update issues doc
Praneeth0910 May 27, 2026
90cf9c1
Fix docker-compose stale image caching
Praneeth0910 May 27, 2026
b8ad042
chore: fix WARNs, populate benchmarks, update docs
Praneeth0910 May 27, 2026
e3de5cb
docs: rewrite documentation and ADRs to reflect technical lessons and…
Praneeth0910 May 27, 2026
f905411
feat: mitigate slowloris attack with http.Server timeouts
Praneeth0910 May 27, 2026
e42ba90
fix(security): mitigate TOCTOU symlink attack in jail directory
Praneeth0910 May 27, 2026
28fefe8
feat(api): implement queue timeout for concurrency semaphore
Praneeth0910 May 27, 2026
364d594
docs: replace placeholder benchmarks with real hey measurements
Praneeth0910 May 27, 2026
4f1de6d
docs: fix C++ c=1 benchmark footnote with concrete hey v0.1.5 explana…
Praneeth0910 May 27, 2026
a47bd51
docs: add hey v0.1.5 c=1 early-exit bug to issues.md
Praneeth0910 May 27, 2026
9196aee
fix(lint): resolve unchecked errors and formatting in core execution …
Praneeth0910 May 27, 2026
34186a8
fix(lint): remove blank identifier assignments for errcheck/staticche…
Praneeth0910 May 27, 2026
bef9dc7
fix(lint): resolve final errcheck violations for blank assignments
Praneeth0910 May 27, 2026
5ec7060
test: fix hardcoded language count in config validation test
Praneeth0910 May 27, 2026
82dc4bd
Fix CI failure: skip integration tests in standard test run
Praneeth0910 May 27, 2026
a8a5e36
Fix golangci-lint errors in scripts/attack-test.go
Praneeth0910 May 27, 2026
67f0f04
Fix specific golangci-lint issues requested by user
Praneeth0910 May 27, 2026
2bfe57c
Fix 8 golangci-lint errors: ineffassign, gofmt, octalLiteral, paramTy…
Praneeth0910 May 27, 2026
dec840b
Fix SA4006: remove dead middleware context assignments in run handler
Praneeth0910 May 27, 2026
3b0f99a
feat: add Verilog support and increase cpp timeout
Praneeth0910 May 27, 2026
d6378dd
fix: enforce API contract duration_ms and dynamic Java artifact
Praneeth0910 May 27, 2026
048fa43
feat: core logic for memory limit, health probes, and sweeper
Praneeth0910 May 27, 2026
9e4e34b
docs: remove inaccurate nsjail build section and fix: remove dead val…
Praneeth0910 May 27, 2026
1a95031
fix: resolve golangci-lint errors with errors.As and CommandResult st…
Praneeth0910 May 27, 2026
3008964
feat: add Rust, Go and Kotlin language support
Praneeth0910 May 27, 2026
35f203b
fix: resolve goboxd issues including go binary path, memory check, be…
Praneeth0910 May 28, 2026
60fc831
docs: append recent bug fixes to AI issues
Praneeth0910 May 28, 2026
97acc52
fix: refactor memoryExceeded detection to not override legitimately c…
Praneeth0910 May 28, 2026
d94f2d5
docs: correct the entry regarding OOM detection regression
Praneeth0910 May 28, 2026
cde39c6
docs: update benchmarks.md with real load test results
Praneeth0910 May 28, 2026
8687917
fix: use correct version flags for go, kotlinc, and iverilog
Praneeth0910 May 28, 2026
9d65ace
docs: benchmarks with real hey results, two runs averaged, WSL2 noted
Praneeth0910 May 28, 2026
d41a7ec
fix: resolve golangci-lint errors in health.go
Praneeth0910 May 28, 2026
1d39e21
fix: resolve gocritic rangeValCopy lint error in health.go
Praneeth0910 May 28, 2026
a4b238e
style: apply gofmt to fix struct alignment and trailing newline
Praneeth0910 May 28, 2026
b3f6f09
fix: resolve top 10 outstanding API contract, spec, and robustness is…
Praneeth0910 May 28, 2026
a3a3231
style: fix gofmt — remove extra blank lines in runner.go
Praneeth0910 May 28, 2026
1a369f0
style: gofmt — restore required blank line in runner.go
Praneeth0910 May 28, 2026
7d9414d
feat: add run-phase flag allowlist validation
Praneeth0910 May 28, 2026
a39e635
feat: add Ruby support, update Go build path and limits, and increase…
Praneeth0910 May 28, 2026
fd847f4
feat: allow infinite memory for Go and configure temporary directorie…
Praneeth0910 May 28, 2026
ef0bc44
fix: set hard memory limit of 4096MB for Go language runner instead o…
Praneeth0910 May 28, 2026
8ca0799
feat: expand memory limits, add file descriptor limits, include JVM b…
Praneeth0910 May 28, 2026
3b55096
feat: implement and register CORS middleware for API requests
Praneeth0910 May 28, 2026
3c727f1
feat: add interactive sandbox executor demo interface
Praneeth0910 May 28, 2026
9c0da98
docs: add documentation for the web interface usage and setup instruc…
Praneeth0910 May 28, 2026
c244798
docs: update project documentation in README.md
Praneeth0910 May 28, 2026
3c48dfe
docs: add getting-started and development guides, update README
Praneeth0910 May 29, 2026
de48dbf
docs: add PR submission guide and traffic simulation script
Praneeth0910 May 29, 2026
09cf89f
fix: filter JVM warning messages out of language version string in in…
Praneeth0910 May 29, 2026
44f8339
fix(web): prevent starter code from overwriting user code, autoload o…
Praneeth0910 May 29, 2026
6d2ea75
feat(web): add instructions popup modal with first-visit auto-show
Praneeth0910 May 29, 2026
33c8772
fix(validate): improve flag validation logic for empty allowlist
Praneeth0910 May 30, 2026
96abb74
feat(config): implement MergeWithCap for ResourceLimits to enforce co…
Praneeth0910 May 30, 2026
a5456d3
docs(benchmarks): add key takeaways for analysis of benchmark results
Praneeth0910 May 30, 2026
b3c9806
feat(sandbox): add SafeJoin function to ensure path safety within san…
Praneeth0910 May 30, 2026
8af49f2
docs(security): enhance security audit details and clarify fixes for …
Praneeth0910 May 30, 2026
d50441e
refactor(handler): introduce Deps struct for dependency injection in …
Praneeth0910 May 30, 2026
48a222b
refactor: implement safe path resolution to prevent directory travers…
Praneeth0910 May 30, 2026
b7041a1
fix: check filepath.Abs errors in SafeJoin to satisfy errcheck linter
Praneeth0910 May 30, 2026
736739b
feat: add seccomp Kafel policy to nsjail sandbox
Praneeth0910 May 30, 2026
71a8cc4
feat: implement cgroup memory limits, peak reporting, and sandbox sec…
Praneeth0910 May 30, 2026
59c5d91
fix: resolve CI lint failures in health.go and formatting
Praneeth0910 May 30, 2026
31511e1
ci: add Dockerfile smoke tests for all language toolchains
Praneeth0910 May 30, 2026
ad5d03d
fix: resolve residual linter warnings in runner.go
Praneeth0910 May 30, 2026
14ba1da
fix: use cgroupBase const to satisfy gocritic filepathJoin
Praneeth0910 May 30, 2026
c362355
docs: update api, architecture, development, and security docs to ref…
Praneeth0910 May 30, 2026
4ed47ae
docs: rewrite README — informative, no emoji, highlights differentiat…
Praneeth0910 May 30, 2026
cb6a8ca
docs: update AI logs — issues, ADRs, prompts, patterns, plan-evolutio…
Praneeth0910 May 30, 2026
891dfbd
fix: validate run-phase flags even when allowlist is empty
Praneeth0910 May 30, 2026
ae737ad
fix: return 400 for out-of-range resource limits and remove dead code
Praneeth0910 May 30, 2026
8107065
fix: resolve golangci-lint errcheck and gofmt errors
Praneeth0910 May 30, 2026
bbae0f5
docs: add --cgroupns=host to all docker run commands for cgroupv2 com…
Praneeth0910 May 30, 2026
0f120b5
fix: prevent false positive memory limit errors during runner timeout…
Praneeth0910 May 30, 2026
5f7fc42
Fix issues in docs and docker-compose
Praneeth0910 May 31, 2026
625de9d
fix(status): use whole-string TrimSpace for output_whitespace_mismatch
Praneeth0910 Jun 9, 2026
6d96bdd
fix(handler): separate MaxBodyBytes from MaxSourceBytes; make source_…
Praneeth0910 Jun 9, 2026
d765dcb
test(runner): assert artifact placeholder resolves correctly in run cmd
Praneeth0910 Jun 9, 2026
ed465da
feat(docker): per-language install scripts; adding a language needs n…
Praneeth0910 Jun 9, 2026
0e0c612
feat(langs): add Lua as bonus language
Praneeth0910 Jun 9, 2026
3246516
docs(ai): ADRs and postmortem for Stage 2 fixes
Praneeth0910 Jun 9, 2026
b981334
docs: update benchmarks and languages for Stage 2
Praneeth0910 Jun 9, 2026
d380460
chore: final Stage 2 polish, CI green
Praneeth0910 Jun 9, 2026
732ab84
fix(docker): unexclude scripts/lang_install/ from .dockerignore
Praneeth0910 Jun 9, 2026
f6e6212
fix(docker): ensure lang_install files are not ignored
Praneeth0910 Jun 9, 2026
d10e317
fix(docker): remove go version check from go.sh
Praneeth0910 Jun 9, 2026
0948697
feat: add support for OCaml, TypeScript, and Scala with installation …
Praneeth0910 Jun 12, 2026
271393f
feat: optimize language resource limits, implement custom Node.js/Swi…
Praneeth0910 Jun 12, 2026
8301166
docs: add load test run 1 results and update README with findings
Praneeth0910 Jun 12, 2026
3036d88
docs: add Run 2 load test results and configurations
Praneeth0910 Jun 12, 2026
4dd0dd5
chore: add load test run 3 performance data and automation script
Praneeth0910 Jun 12, 2026
68d6b20
docs: add Run 3 load test results + Run 4 config ready
Praneeth0910 Jun 12, 2026
018a9c8
docs: add Run 4 final load test results and configurations
Praneeth0910 Jun 12, 2026
2e8a10d
docs: update documentation of stage 2&3 with AI logs and prompts
Praneeth0910 Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
docs/
*.md
*.pdf
.git/
.github/
.vscode/
.gitlab-ci.yml
.golangci.yml
contextmedia_Alagents/
*.log
tmp/
tests/
scripts/
# Allow lang_install scripts into Docker build context
!scripts/lang_install/
!scripts/lang_install/**
external/
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [main, team/sudo]
pull_request:
branches: [main]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- uses: golangci/golangci-lint-action@v3
with:
version: v1.64.8
args: --timeout=5m

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- run: go build -v ./cmd/goboxd

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- run: go test -v -race -cover $(go list ./... | grep -v '/tests')

docker:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
push: false
tags: goboxd:latest
16 changes: 14 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ go.work.sum
.env

# Editor/IDE
# .idea/
# .vscode/
.idea/
.vscode/
nsjail/
external/nsjail/
contextmedia_AIagents/goboxd
server.log
nsjail/
contextmedia_AIagents/
*.Zone.Identifier

# Local compiled binaries and scripts
nsjail
test_endpoints*.sh
payloads/*
48 changes: 48 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
stages:
- lint
- build
- test
- docker

variables:
GO_VERSION: "1.22"
GOPATH: $CI_PROJECT_DIR/.go
PATH: $GOPATH/bin:$PATH

lint:
stage: lint
image: golang:1.22-alpine
before_script:
- apk add --no-cache curl git
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
script:
- golangci-lint run --timeout=5m
allow_failure: false

build:
stage: build
image: golang:1.22-alpine
script:
- go build -v ./cmd/goboxd
artifacts:
paths:
- cmd/goboxd/goboxd
expire_in: 1 hour

test:
stage: test
image: golang:1.22-alpine
script:
- go test -v -race -cover ./...
coverage: '/^coverage:\s*(\d+(?:\.\d+)?%)/'

docker:
stage: docker
image: docker:latest
services:
- docker:dind
script:
- docker build -t goboxd:latest .
only:
- main
- merge_requests
83 changes: 83 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# golangci-lint v1.64.x configuration for goboxd
# Go 1.22+ systems project with security focus

run:
timeout: 5m
go: '1.22'

linters:
enable:
- asasalint # Find misuse of sync/atomic
- bidichk # Check dangerous unicode bidirectional characters
- bodyclose # Ensure HTTP response bodies are closed
- decorder # Check declaration order
- dogsled # Prevent blank identifier assignments
- errcheck # Unchecked error returns
- errorlint # Improper error wrapping
- gofmt # Enforce gofmt formatting
- govet # Official Go vet
- ineffassign # Ineffectual assignments
- loggercheck # Incorrect logging calls
- misspell # Spelling errors in comments
- prealloc # Preallocate slices when possible
- staticcheck # Advanced static analysis
- typecheck # Type checking
- unconvert # Unnecessary type conversions
- unused # Unused code detection
- whitespace # Whitespace issues
- gosimple # Simplify code
- gocritic # Opinionated Go code style checks

disable:
- wrapcheck # Too strict for internal errors
- exhaustive # Not needed here
- cyclop # Cyclomatic complexity (systems code can exceed)
- dupl # Duplicate code (acceptable at boundaries)
- forbidigo # Allow print/fmt in specific contexts
- gocognit # Cognitive complexity (systems code unavoidably complex)
- gocyclo # Cyclomatic complexity (systems code can exceed)
- lll # Line length (we use editor wrapping)
- mnd # Magic numbers (legitimate in systems code)
- varnamelen # Variable name length (ok for single-use iterators)

linters-settings:
gocritic:
enabled-tags:
- diagnostic
- style
- performance
- experimental
disabled-checks:
- commentedOutCode
- hugeParam

errcheck:
check-type-assertions: true
check-blank: true
exclude-functions:
- io.Copy
- fmt.Fprint

staticcheck:
checks: ["all"]

gosimple:
checks: ["all"]

unused:
check-exported: false

govet:
enable:
- all
disable:
- shadow

issues:
exclude-rules:
- source: "var _ ="
linters:
- govet
- source: "^_"
linters:
- unparam
102 changes: 72 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,81 @@
# syntax=docker/dockerfile:1.7
# Stage 1: Build nsjail
FROM debian:trixie-slim AS nsjail-builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
autoconf bison flex gcc g++ git libprotobuf-dev libnl-route-3-dev libtool make pkg-config protobuf-compiler
WORKDIR /nsjail
RUN git clone https://github.com/google/nsjail.git . && \
git checkout 3.4 && \
make -j$(nproc)

ARG GO_VERSION=1.23
ARG DEBIAN_VERSION=bookworm
ARG NSJAIL_VERSION=3.4
# Stage 2: Build Go binary
FROM golang:1.22-bookworm AS go-builder

# ---- Build nsjail from source ----
FROM debian:${DEBIAN_VERSION}-slim AS nsjail-builder
ARG NSJAIL_VERSION
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf bison ca-certificates flex g++ gcc git libnl-route-3-dev \
libprotobuf-dev libtool make pkg-config protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 --branch ${NSJAIL_VERSION} https://github.com/google/nsjail.git /src/nsjail \
&& make -C /src/nsjail \
&& install -m 0755 /src/nsjail/nsjail /usr/local/bin/nsjail

# ---- Builder / dev image (Go + linters + nsjail) ----
FROM golang:${GO_VERSION}-${DEBIAN_VERSION} AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
libnl-route-3-200 libprotobuf32 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=nsjail-builder /usr/local/bin/nsjail /usr/local/bin/nsjail
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
WORKDIR /src
COPY go.mod ./
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/goboxd ./cmd/goboxd

# ---- Runtime image ----
FROM debian:${DEBIAN_VERSION}-slim AS runtime
ARG VERSION=0.1.0
ARG COMMIT=unknown
ENV GOTOOLCHAIN=local

RUN CGO_ENABLED=0 go build \
-ldflags="-s -w -X main.version=${VERSION} -X main.commit=${COMMIT}" \
-o /usr/local/bin/goboxd \
./cmd/goboxd

# Stage 3: Runtime — trixie provides GLIBC 2.41 (nsjail requires >= 2.38)
FROM debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive

# Install nsjail runtime dependencies and base system tools.
# Language toolchains are installed via per-language scripts below.
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libnl-route-3-200 libprotobuf32 \
bash ca-certificates \
libnl-route-3-200 libprotobuf32t64 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=nsjail-builder /usr/local/bin/nsjail /usr/local/bin/nsjail
COPY --from=builder /out/goboxd /usr/local/bin/goboxd

# Install language toolchains via per-language scripts.
# Adding a new language = one .sh file in scripts/lang_install/ + one YAML block.
# No Dockerfile change required.
COPY scripts/lang_install/ /tmp/lang_install/
RUN apt-get update \
&& for f in /tmp/lang_install/*.sh; do echo "== $f =="; bash "$f" || exit 1; done \
&& rm -rf /var/lib/apt/lists/* /tmp/lang_install

# nsjail pinned at tag 3.4 — see .gitmodules
COPY --from=nsjail-builder /nsjail/nsjail /usr/sbin/nsjail
RUN chmod 0755 /usr/sbin/nsjail
COPY --from=go-builder /usr/local/bin/goboxd /usr/local/bin/goboxd

# Copy Go from builder stage and symlink to /usr/bin/go
COPY --from=go-builder /usr/local/go /usr/local/go
RUN ln -s /usr/local/go/bin/go /usr/bin/go && \
ln -s /usr/local/go/bin/gofmt /usr/bin/gofmt


RUN mkdir -p /etc/goboxd
COPY languages.yaml /etc/goboxd/languages.yaml
RUN mkdir -p /tmp/goboxd && chmod 1777 /tmp/goboxd

ENV NSJAIL_PATH=/usr/sbin/nsjail
ENV LANGUAGES_CONFIG=/etc/goboxd/languages.yaml

# Smoke-test every language toolchain at build time
RUN python3 --version \
&& node --version \
&& gcc --version \
&& g++ --version \
&& java -version \
&& javac -version \
&& iverilog -V \
&& bash --version \
&& ruby --version \
&& rustc --version \
&& kotlinc -version \
&& go version \
&& lua5.4 -v

EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/goboxd"]
ENTRYPOINT ["/usr/local/bin/goboxd", "--config", "/etc/goboxd/languages.yaml"]
18 changes: 18 additions & 0 deletions Dockerfile.offline
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM goboxd:latest

ENV DEBIAN_FRONTEND=noninteractive

# Install npm (needed for tsc) and scala (JDK already present from kotlin)
RUN apt-get update \
&& apt-get install -y --no-install-recommends npm scala \
&& npm install -g typescript \
&& rm -rf /var/lib/apt/lists/*

# Update languages.yaml with TypeScript + Scala + tsc path fix
COPY languages.yaml /etc/goboxd/languages.yaml

# Smoke-test new toolchains
RUN tsc --version && scala -version

EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/goboxd", "--config", "/etc/goboxd/languages.yaml"]
Loading